| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Kevin Brown <blargity(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Simple Join |
| Date: | 2005-12-17 14:56:49 |
| Message-ID: | 200512171456.jBHEunM07437@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
Tom Lane wrote:
> Kevin Brown <blargity(at)gmail(dot)com> writes:
> > I'm running 8.1 installed from source on a Debian Sarge server. I have a
> > simple query that I believe I've placed the indexes correctly for, and I
> > still end up with a seq scan. It makes sense, kinda, but it should be able
> > to use the index to gather the right values.
>
> I continue to marvel at how many people think that if it's not using an
> index it must ipso facto be a bad plan ...
>
> That plan looks perfectly fine to me. You could try forcing some other
> choices by fooling with the planner enable switches (eg set
> enable_seqscan = off) but I doubt you'll find much improvement. There
> are too many rows being pulled from ordered_products to make an index
> nestloop a good idea.
We do have an FAQ item:
4.6) Why are my queries slow? Why don't they use my indexes?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2005-12-17 16:43:15 | Re: Should Oracle outperform PostgreSQL on a complex |
| Previous Message | Jaime Casanova | 2005-12-17 12:31:40 | Re: Overriding the optimizer |