[Info-Ingres] Generate 1 million rows of unique data - Friday fun

This is a discussion on [Info-Ingres] Generate 1 million rows of unique data - Friday fun within the Ingres Database forums in Other Databases category; Hi everyone, I was recently trading techno nerdy stories with my children and their friends who have, it seems, surpassed my own skills. A challenge was issued to see which programmer could create a million unique rows in the database the most quickly. (They were all talk no action of course ) The tools were PHP, C++, vb, OpenROAD, mysql, ingres, mssql, Compiled code vs interpreted, FOR loops vs WHILE loops etc. This was my offering, standard ingres SQL and trusty terminal monitor. select date('now');\g create table digits (v varchar(1));\g create table millions (v1 varchar(6)) ;\g ...

Go Back   Database Forum > Other Databases > Ingres Database

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 10-24-2008, 02:11 AM
Default [Info-Ingres] Generate 1 million rows of unique data - Friday fun

Hi everyone,

I was recently trading techno nerdy stories with my children and their
friends who have, it seems, surpassed my own skills. A challenge was issued
to see which programmer could create a million unique rows in the database
the most quickly. (They were all talk no action of course ) The tools were
PHP, C++, vb, OpenROAD, mysql, ingres, mssql, Compiled code vs interpreted,
FOR loops vs WHILE loops etc.

This was my offering, standard ingres SQL and trusty terminal monitor.


select date('now');\g

create table digits (v varchar(1));\g
create table millions (v1 varchar(6)) ;\g
commit;\g

insert into digits values ('0');
insert into digits values ('1');
insert into digits values ('2');
insert into digits values ('3');
insert into digits values ('4');
insert into digits values ('5');
insert into digits values ('6');
insert into digits values ('7');
insert into digits values ('8');
insert into digits values ('9');
commit;\g

insert into millions
select a.v + b.v + c.v + d.v + e.v + f.v
from digits a, digits b, digits c, digits d, digits e, digits f;\g
commit;\g

select date('now');\g



Timings here for your interest.
The physical table generated was around 11Mb.
And I found it interesting that the 1GB transaction log filled to 37%
I guess I was expecting of the order of 6Mb
Linux almost won but ran out of transaction log.


SunFire V880 Sparc V9 8x1.2Ghz processors 32GB RAM
Storedge 3510 with Raid 0+1, dual transaction logs of 1GB
Database cache of about 60MB RAM

rows seconds
1000 0
10000 3
100000 22
1000000 230


2. SunFire V880 Sparc V9 6x750Mhz processors 12GB RAM
Storedge 3310 with RAID 0+1, dual transaction logs of 1GB
Database Cache around 30MB ram

rows seconds
1000 1
10000 4
100000 37
1000000 344


3. Linux Single 2.2 Ghz Xeon dualcore processor 2GB RAM
Internal disks RAID 0, Single transaction log of 500Mb
Database Cache around 60 MB RAM

rows seconds
1000 0
10000 1
100000 6
1000000 txn log full aborted

I will increase the log size later this weekend and try again.


Reply With Quote
  #2  
Old 10-24-2008, 04:34 AM
Default Re: Generate 1 million rows of unique data - Friday fun

Hm, this is much faster on my Linux desktop (9.1.1 a64.lnx), 62
seconds for 100000 rows.
However, I would slightly change your idea to eliminate the logging
system, i.e.
----
select date('now');\p\g

create table digits (v varchar(1));\p\g
commit;\p\g

insert into digits values ('0');
insert into digits values ('1');
insert into digits values ('2');
insert into digits values ('3');
insert into digits values ('4');
insert into digits values ('5');
insert into digits values ('6');
insert into digits values ('7');
insert into digits values ('8');
insert into digits values ('9');
commit;\p\g

create table millions as
select a.v + b.v + c.v + d.v + e.v + f.v as v1
from digits a, digits b, digits c, digits d, digits e, digits f
with nojournaling;\p\g
commit;\p\g

select date('now');\p\g
----

The create table ... as select ... with nojournaling makes sure that
the insert doesn't go through the logging system, got the 1000000 rows
in 2 seconds.

Regards
Kristoff



On Oct 24, 7:11 am, "Paul White" wrote:
> Hi everyone,
>
> I was recently trading techno nerdy stories with my children and their
> friends who have, it seems, surpassed my own skills. A challenge was issued
> to see which programmer could create a million unique rows in the database
> the most quickly. (They were all talk no action of course ) The tools were
> PHP, C++, vb, OpenROAD, mysql, ingres, mssql, Compiled code vs interpreted,
> FOR loops vs WHILE loops etc.
>
> This was my offering, standard ingres SQL and trusty terminal monitor.
>
> select date('now');\g
>
> create table digits (v varchar(1));\g
> create table millions (v1 varchar(6)) ;\g
> commit;\g
>
> insert into digits values ('0');
> insert into digits values ('1');
> insert into digits values ('2');
> insert into digits values ('3');
> insert into digits values ('4');
> insert into digits values ('5');
> insert into digits values ('6');
> insert into digits values ('7');
> insert into digits values ('8');
> insert into digits values ('9');
> commit;\g
>
> insert into millions
> select a.v + b.v + c.v + d.v + e.v + f.v
> from digits a, digits b, digits c, digits d, digits e, digits f;\g
> commit;\g
>
> select date('now');\g
>
> Timings here for your interest.
> The physical table generated was around 11Mb.
> And I found it interesting that the 1GB transaction log filled to 37%
> I guess I was expecting of the order of 6Mb
> Linux almost won but ran out of transaction log.
>
> SunFire V880 Sparc V9 8x1.2Ghz processors 32GB RAM
> Storedge 3510 with Raid 0+1, dual transaction logs of 1GB
> Database cache of about 60MB RAM
>
> rows seconds
> 1000 0
> 10000 3
> 100000 22
> 1000000 230
>
> 2. SunFire V880 Sparc V9 6x750Mhz processors 12GB RAM
> Storedge 3310 with RAID 0+1, dual transaction logs of 1GB
> Database Cache around 30MB ram
>
> rows seconds
> 1000 1
> 10000 4
> 100000 37
> 1000000 344
>
> 3. Linux Single 2.2 Ghz Xeon dualcore processor 2GB RAM
> Internal disks RAID 0, Single transaction log of 500Mb
> Database Cache around 60 MB RAM
>
> rows seconds
> 1000 0
> 10000 1
> 100000 6
> 1000000 txn log full aborted
>
> I will increase the log size later this weekend and try again.


Reply With Quote
  #3  
Old 10-24-2008, 07:58 AM
Default Re: [Info-Ingres] Generate 1 million rows of unique data - Fridayfun

Hi Paul,

I ran it on a Box with:

Ingres II 9.1.1 (a64.lnx/103)NPTL
1GB Transaction Log
55MB DMF Cache
RedHat ES5 Linux
SunFire x4100 8GB RAM 2 x Dual Core CPU 2.8Ghz Storedge 6140 RAID 10

1000000 rows in 5 sec.

Leandro Fava
Setor de Informática - UNISC
+55 51 3717 7636


On Oct 24, 7:11 am, "Paul White" wrote:
> Hi everyone,
>
> I was recently trading techno nerdy stories with my children and their
> friends who have, it seems, surpassed my own skills. A challenge was issued
> to see which programmer could create a million unique rows in the database
> the most quickly. (They were all talk no action of course ) The tools were
> PHP, C++, vb, OpenROAD, mysql, ingres, mssql, Compiled code vs interpreted,
> FOR loops vs WHILE loops etc.
>
> This was my offering, standard ingres SQL and trusty terminal monitor.
>
> select date('now');\g
>
> create table digits (v varchar(1));\g
> create table millions (v1 varchar(6)) ;\g
> commit;\g
>
> insert into digits values ('0');
> insert into digits values ('1');
> insert into digits values ('2');
> insert into digits values ('3');
> insert into digits values ('4');
> insert into digits values ('5');
> insert into digits values ('6');
> insert into digits values ('7');
> insert into digits values ('8');
> insert into digits values ('9');
> commit;\g
>
> insert into millions
> select a.v + b.v + c.v + d.v + e.v + f.v
> from digits a, digits b, digits c, digits d, digits e, digits f;\g
> commit;\g
>
> select date('now');\g
>
> Timings here for your interest.
> The physical table generated was around 11Mb.
> And I found it interesting that the 1GB transaction log filled to 37%
> I guess I was expecting of the order of 6Mb
> Linux almost won but ran out of transaction log.
>
> SunFire V880 Sparc V9 8x1.2Ghz processors 32GB RAM
> Storedge 3510 with Raid 0+1, dual transaction logs of 1GB
> Database cache of about 60MB RAM
>
> rows seconds
> 1000 0
> 10000 3
> 100000 22
> 1000000 230
>
> 2. SunFire V880 Sparc V9 6x750Mhz processors 12GB RAM
> Storedge 3310 with RAID 0+1, dual transaction logs of 1GB
> Database Cache around 30MB ram
>
> rows seconds
> 1000 1
> 10000 4
> 100000 37
> 1000000 344
>
> 3. Linux Single 2.2 Ghz Xeon dualcore processor 2GB RAM
> Internal disks RAID 0, Single transaction log of 500Mb
> Database Cache around 60 MB RAM
>
> rows seconds
> 1000 0
> 10000 1
> 100000 6
> 1000000 txn log full aborted
>
> I will increase the log size later this weekend and try again.


_______________________________________________
Info-Ingres mailing list
Info-Ingres-at-kettleriverconsulting.com
http://www.kettleriverconsulting.com...fo/info-ingres

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 10:54 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Integrated by bbpixel2009 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.