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.