---
title: "oracle自动插入100w行记录"
author: "jerry_chen"
date: "2012-11-07T15:51:18Z"
tags: []
categories: ["数据库"]
slug: "oracle-100w"
draft: false
lastmod: "2012-11-07T15:51:18Z"
id: 1718475
url: "https://jerry-chen.iteye.com/blog/1718475"
---

1、打开ql/sql测试窗口

![](http://dl.iteye.com/upload/attachment/0076/2862/4ba40080-75b5-308f-810a-b7ff3a6fb68c.png)

2、输入脚本

 

-- Created on 2012/11/7 by JERRY 

declare 

  -- Local variables here

  count integer;

begin

  -- Test statements here

  dbms\_output.put\_line('start:'||sysdate);

 

  for count in 1..1000000 loop

    insert into gather\_hour a 

           values (sys\_guid(), sysdate, sys\_guid(), sys\_guid(), 123, sys\_guid(), 100022229999);

    commit;

  end loop;

 

  dbms\_output.put\_line('end:'||sysdate);

end;

 

![](http://dl.iteye.com/upload/attachment/0076/2864/d4afeeee-7d7a-317c-8cbd-3dd5e2969488.png)

 

3、执行脚本

![](http://dl.iteye.com/upload/attachment/0076/2868/2627f143-d3b7-3a1e-9737-f64027ff4b07.png)