Re: statistics about tamp tables ...
От | Hans-Jürgen Schönig |
---|---|
Тема | Re: statistics about tamp tables ... |
Дата | |
Msg-id | 3FC4D614.7050307@cybertec.at обсуждение исходный текст |
Ответ на | Re: statistics about tamp tables ... (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: statistics about tamp tables ...
|
Список | pgsql-hackers |
Tom Lane wrote: > Hans-Jürgen Schönig <postgres@cybertec.at> writes: > >>Recently I have come across a simple issue which made me think about it. >>When we create a tmp table (SELECT INTO, CREATE TABLE AS) the planner >>won't know anything about its content after creating it. > > > Run ANALYZE on the temp table, if you intend to use it enough to justify > gathering stats about it. VACUUM is more work than needed. > > regards, tom lane Of course, VACUUM is on overkill (there is no use to shrink something minimal ;) ). The reason why I came up with this posting is slightly different: Assume a JDBC application which works with PostgreSQL + some other database. If you want to use both databases without PostgreSQL being unnecessarily slow an implicit mechanism would be better. Because otherwise you will have an SQL command in there which is off standard - putting a switch into the application seems to be a fairly ugly solution. regards, Hans -- Cybertec Geschwinde u Schoenig Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria Tel: +43/2952/30706 or +43/660/816 40 77 www.cybertec.at, www.postgresql.at, kernel.cybertec.at
В списке pgsql-hackers по дате отправления: