From: | Alex Howansky <alex(at)wankwood(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] how to tell the difference between empty field and null field |
Date: | 1999-12-13 05:31:34 |
Message-ID: | Pine.LNX.4.20.9912122315040.20864-100000@net-srv-0001.bvrd.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> An index on (user, domain) is perfectly useless for the above query,
> because the user field isn't mentioned anywhere in the query. An index
> on domain alone could be used, though, and should be pretty effective.
> (We do have some performance problems if you get into dozens of OR
> terms, but for just a couple, no sweat.)
Heh heh, oops. Index on domain alone is what I meant, sorry, I was trying to
mix two different examples in my head without actually running them. :)
My main concern is with the use of the 'or' in the query. My experience is
mostly with Progress -- it (at least the ancient version that I'm used to)
can't utilize the index on a field _at all_ if your query uses an 'or' on that
field. As a result, I've become extremely cautious about doing this with
Postgres. You seem to be saying that it's no a big deal -- that the index will
still be utilized and that performance will not suffer significantly. Is this
something that I can finally forget worrying about?
Thanks for the help and the speedy reply.
--
Alex Howansky
alex(at)wankwood(dot)com
http://www.wankwood.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Brent Wood | 1999-12-13 06:36:40 | Problem copying polygon data into a table |
Previous Message | Tom Lane | 1999-12-13 05:14:20 | Re: [SQL] how to tell the difference between empty field and null field |