• SPEForums need your contributions to build up a strong repository of performance engineering resources.

Resource icon

Script to Create Huge Table for Performance Testing

admin

Administrator
Staff member
admin submitted a new resource:

Script to Create Huge Table for Performance Testing - Create a Table Having 1 Million Rows With Date

1. Create table in the database

Code:
CREATE TABLE speforums_bigtable (
  id            NUMBER(10),
  created_date  DATE,
  lookup_id     NUMBER(10),
  data          VARCHAR2(50)
);

View attachment 167

2. Execute following script to create 1000000 rows of data. This may take some time to complete the operation.

Code:
DECLARE
  l_lookup_id    NUMBER(10);
  l_create_date  DATE;
BEGIN
  FOR i IN 1 .. 1000000 LOOP
    IF MOD(i, 3) = 0 THEN
      l_create_date :=...

Read more about this resource...
 
Back
Top