| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Marc Morin" <marc(at)sandvine(dot)com> |
| Cc: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Trouble managing planner for timestamptz columns |
| Date: | 2006-03-10 23:40:40 |
| Message-ID: | 22202.1142034040@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
"Marc Morin" <marc(at)sandvine(dot)com> writes:
> Well this analyze just took 12 minutes... Stats target of 100.
> # time psql xxx xxx -c "analyze elem_trafficstats_1"
Try analyzing just the one column, and try reducing its stats target to
10. It does make a difference:
sorttest=# set default_statistics_target TO 100;
SET
Time: 0.382 ms
sorttest=# analyze verbose d10;
INFO: analyzing "public.d10"
INFO: "d10": scanned 30000 of 833334 pages, containing 3600000 live rows and 0 dead rows; 30000 rows in sample, 100000080 estimated total rows
ANALYZE
Time: 137186.347 ms
sorttest=# set default_statistics_target TO 10;
SET
Time: 0.418 ms
sorttest=# analyze verbose d10(col1);
INFO: analyzing "public.d10"
INFO: "d10": scanned 3000 of 833334 pages, containing 360000 live rows and 0 dead rows; 3000 rows in sample, 100000080 estimated total rows
ANALYZE
Time: 17206.018 ms
sorttest=#
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andre Felipe Machado | 2006-03-11 01:39:57 | firebird X postgresql 8.1.2 windows, performance comparison |
| Previous Message | Marc Morin | 2006-03-10 21:47:08 | Re: Trouble managing planner for timestamptz columns |