Thread: filling database

filling database

From
"raptor@tvskat.net"
Date:
hi,

Does anyone know of a tool for filling the database with alot of random data...
so that I can add millions of rows to test approx how well it will scale ?

tia


-----
http://linuxtoday.com/news_story.php3?ltsn=2004-12-08-004-32-OS-BZ-DT-0005
snip> MS Office is popular in the same way as heart disease is the most popular way to die.

Re: filling database

From
Dan Black
Date:
EMS PostgreSQL Data Generator
http://sqlmanager.net/products/postgresql/datagenerator

And you can write you own pgplsql function that fill you database with any random data.
I think it would be better and cheaper =)

2005/5/20, raptor@tvskat.net <raptor@tvskat.net >:
hi,

Does anyone know of a tool for filling the database with alot of random data...
so that I can add millions of rows to test approx how well it will scale ?

tia

-----
http://linuxtoday.com/news_story.php3?ltsn=2004-12-08-004-32-OS-BZ-DT-0005
snip> MS Office is popular in the same way as heart disease is the most popular way to die.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



--
Verba volent, scripta manent
My ISP  - http://www.netbynet.ru

Re: filling database

From
sachin kotwal
Date:
create sample table with one or two rows then use following command to
populate data.

INSERT INTO TABLE_NAME VALUES(generate_series(1,1000000000));



-----
Thanks and Regards,

Sachin Kotwal
NTT-DATA-OSS Center (Pune)
--
View this message in context: http://postgresql.1045698.n5.nabble.com/GENERAL-filling-database-tp1843856p5768376.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: filling database

From
Steve Crawford
Date:
On 08/23/2013 03:29 AM, sachin kotwal wrote:
create sample table with one or two rows then use following command to
populate data.

INSERT INTO TABLE_NAME VALUES(generate_series(1,1000000000));

Cartesian joins are also useful - especially when you want semi-realistic data. A quick Google will get you a list of 1000 surnames and another 1000 given names. Then a cartesian join like:

select given.givenname, surnames.surname from given,surnames

will give you a million rows. Add a middle-initial column and you quickly expand to 26-million unique names. Need more? There are lists that go well beyond 1000 names or you can just use a full middle name instead of an initial and get a 1,000,000,000 names (or somewhat less if you eliminate names where first/middle/last name are the same).

Then you can chuckle at your newly integrated society with Huang Alexopoulos O'Leary, Albrecht Fernandez Grebenshchikov and Wekesa Étienne Nikoleta.

Add in similar lists of common town-names and street-names along with some generated street numbers and you will quickly exceed the world population and/or your storage capacity.

Cheers,
Steve