Re: Tips/Hacks to create minial DB from the execution of several (simple) SQL requests.

Поиск
Список
Период
Сортировка
От Scott Bailey
Тема Re: Tips/Hacks to create minial DB from the execution of several (simple) SQL requests.
Дата
Msg-id 4ACEC916.8080504@comcast.net
обсуждение исходный текст
Ответ на Re: Tips/Hacks to create minial DB from the execution of several (simple) SQL requests.  (Daniel Shane <shaned@LEXUM.UMontreal.CA>)
Список pgsql-general
Daniel Shane wrote:
> Hi Scott!
>
> The problem is that my test database has several tables with many links between them, so I have no idea which 1000
rowsto get from which table. The only thing I can do is run the program that connects to that database and tell it to
runon a sample of the database. 
>
> I can get a log of all the queries that are executed, but I was wondering if there was a more general solution where
Icould use a "modified/hacked" postgres driver and catch all the rows of all the tables that were accessed during those
queries.
>
> I could then simply insert them into the test database and in theory my program should run the same if I used it
insteadof the real one (assuming its configure to run on the same sample). 
>
> Daniel Shane

Yeah, still a much easier way. If there are many links between the
tables, then related records would typically be inserted either in the
same transaction or soon there after. You can use the xmin columns to
copy related rows from all tables.

Scott

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

Предыдущее
От: Lew
Дата:
Сообщение: Re: Best data type to use for sales tax percent
Следующее
От: Mitesh51
Дата:
Сообщение: Re: How to reduce WAL file Size