Re: index creation order?
| От | Chester Kustarz |
|---|---|
| Тема | Re: index creation order? |
| Дата | |
| Msg-id | Pine.BSO.4.44.0310311518100.10754-100000@detroit.arbor.net обсуждение исходный текст |
| Ответ на | Re: index creation order? (Josh Berkus <josh@agliodbs.com>) |
| Ответы |
Re: index creation order?
Re: index creation order? |
| Список | pgsql-performance |
is there any way to update the stats inside a transaction? what i have is something like: select count(*) from foo; -> 0 begin; copy foo from '/tmp/foo'; -- about 100k rows -- run some queries on foo which perform horribly because the stats -- are way off (100k rows v. 0 rows) commit; it seems that you cannot run analyze inside a transaction: begin; analyze foo; ERROR: ANALYZE cannot run inside a BEGIN/END block i am using version 7.2.3. any work-a-rounds? should i try updating pg_statistic manually? On Fri, 31 Oct 2003, Josh Berkus wrote: > Among other things, ANALYZE tells postgres how many rows are in the table. So > if you add a PK constraint after loading 10 million rows without ANALYZE, > PostgreSQL is likely to think that there is only one row in the table ... and > choose a nested loop or some other really inefficient method of checking for > uniqueness.
В списке pgsql-performance по дате отправления: