Re: Performance Optimization for Dummies 2 - the SQL
| От | Scott Marlowe | 
|---|---|
| Тема | Re: Performance Optimization for Dummies 2 - the SQL | 
| Дата | |
| Msg-id | 1160153623.6181.13.camel@state.g2switchworks.com обсуждение исходный текст | 
| Ответ на | Re: Performance Optimization for Dummies 2 - the SQL ("Carlo Stonebanks" <stonec.register@sympatico.ca>) | 
| Ответы | Re: Performance Optimization for Dummies 2 - the SQL | 
| Список | pgsql-performance | 
On Fri, 2006-10-06 at 11:44, Carlo Stonebanks wrote: > This didn't work right away, but DID work after running a VACUUM FULL. In > other words, i was still stuck with a sequential scan until after the > vacuum. > > I turned autovacuum off in order to help with the import, but was perfoming > an ANALYZE with every 500 rows imported. > > With autovacuum off for imports, how frequently should I VACUUM? Basically once the query planner stops using seq scans is usually good enough, although sometimes there's a bit of a period where it'll be using nested loops and then switch to merge etc... Every 500 is probably a bit much. After the first few thousand rows, run an analyze, and after about 5 to 10 thousand another analyze and you should be set.
В списке pgsql-performance по дате отправления: