Re: performance problem
От | Alvaro Herrera Munoz |
---|---|
Тема | Re: performance problem |
Дата | |
Msg-id | 20031120210600.GC26865@dcc.uchile.cl обсуждение исходный текст |
Ответ на | Re: performance problem ("Rick Gigger" <rick@alpinenetworking.com>) |
Список | pgsql-general |
On Thu, Nov 20, 2003 at 01:52:10PM -0700, Rick Gigger wrote: > I worked around this by starting the transaction and inserting the 45,000 > rows and then killing it. The I removed the index and readded it which > apparently gathered some stats and since there were all of the dead tuples > in there from the failed transaction it now decided that it should use the > index. I reran the script and this time it took 5 minutes again instead of > 1 1/2 hours. Stats are not collected automatically. You should run ANALYZE after importing your data. And it's probably faster to create the index after the data is loaded, too. -- Alvaro Herrera (<alvherre[@]dcc.uchile.cl>) Y una voz del caos me habl� y me dijo "Sonr�e y s� feliz, podr�a ser peor". Y sonre�. Y fui feliz. Y fue peor.
В списке pgsql-general по дате отправления: