Re: filling database

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: filling database
Дата
Msg-id 521B9BE3.9000609@pinpointresearch.com
обсуждение исходный текст
Ответ на Re: filling database  (sachin kotwal <kotsachin@gmail.com>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Rafael Martinez Guerrero
Дата:
Сообщение: Re: Problem creating index
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Problem creating index