Re: huge disparities in =/IN/BETWEEN performance

From: "George Pavlov" <gpavlov(at)mynewplace(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: huge disparities in =/IN/BETWEEN performance
Date: 2007-02-09 02:03:40
Message-ID: 8C5B026B51B6854CBE88121DBF097A86815F81@ehost010-33.exch010.intermedia.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > BYs on user_id and various subqueries, but my basic thought is that
> > should not really matter...
>
> You're unlikely to get any useful comment on this when you have not
> shown any of those details, nor even an EXPLAIN.

yes, i know. i guess i was partially just venting. sorry. the problem is
that the view is very complex and cleansing it for general consumprion
and paring it down to some degree of readability is a lot of work.

the basic question i have is fairly clear though: why saying "where x =
10" should be different (in ANY cicumstance, not just mine) from saying
"where x between 10 and 10" or from "where x in (select ... /* some
query that returns 10 */)" ???

i am not really looking for help optimizing my view and query, more of a
general idea of should this happen, when might this happen, why is it a
good idea that this happens? is this a better statement of the issue?
thanks for listening!

george

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alvaro Herrera 2007-02-09 02:14:14 Re: huge disparities in =/IN/BETWEEN performance
Previous Message Tom Lane 2007-02-09 01:54:28 Re: huge disparities in =/IN/BETWEEN performance