| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Christo Du Preez <christo(at)mecola(dot)com> |
| Cc: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: test / live environment, major performance difference |
| Date: | 2007-06-12 18:42:57 |
| Message-ID: | 21855.1181673777@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
Christo Du Preez <christo(at)mecola(dot)com> writes:
> Fast:
> "public";"layertype";"parentid";0.98797;4;2;"{4,1}";"{0.00902256,0.00300752}";"";-0.142857
> Slow:
> "public";"layertype";"parentid";0.00745157;4;7;"{300}";"{0.976155}";"{1,1,4,5,8,12}";0.92262
Well, those statistics are almost completely different, and what the
slow one says is that parentid = 300 accounts for 97% of the table.
So that's why you get different plans. If that is not reflective of
reality, then you have not ANALYZEd the table lately.
Maybe it's a pilot-error problem, like not doing the ANALYZE as a user
with sufficient privileges? IIRC you have to be table owner, database
owner, or superuser to ANALYZE.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Francisco Reyes | 2007-06-13 00:33:03 | Re: Best use of second controller with faster disks? |
| Previous Message | Steven Flatt | 2007-06-12 18:31:01 | Re: performance drop on 8.2.4, reverting to 8.1.4 |