| From: | Tomasz Myrta <jasiek(at)klaster(dot)net> | 
|---|---|
| To: | Andreas Pflug <Andreas(dot)Pflug(at)web(dot)de> | 
| Cc: | pgsql-performance(at)postgresql(dot)org | 
| Subject: | Re: Slow query performance on large table | 
| Date: | 2003-03-04 17:20:57 | 
| Message-ID: | 3E64E079.8050807@klaster.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-performance | 
Andreas Pflug wrote:
> Tom,
> 
> does this mean that a primary key alone might not be enough? As far as I 
> understood Paul, the PK looks quite as the newly created index does, so 
> "create index ind_meas on measurement (assessment,time)"  should perform 
> the same as "... primary key(assessment,time)".
> Do possibly non-optimal indices (only assessment, only time as Paul 
> described earlier) screw up the optimizer, igoring the better option 
> usiing the PK? Obviously, the index used should be combined of 
> (assessment,time) but IMHO a PK should be enough.
> 
> regards,
> 
> Andreas
You are right - primary key should be ok, but Paul lost it. psql \d 
shows primary key indexes, but in this case there was no such primary key.
Regards,
Tomasz Myrta
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2003-03-04 17:29:28 | PostgreSQL Performance Issue on Mail Server | 
| Previous Message | Tom Lane | 2003-03-04 17:20:26 | Re: Slow query performance on large table |