Hi!
On Tue, 20 Apr 1999, Jackson, DeJuan wrote:
The reason I chose those tow columns is because they are the only one that
will be seen in that where clause.
So position should be indexed on subsec_id, status, and pos_id.
Sounds reasonable.
My general rule of thumb is to stay away from OR clause in PostgreSQL (which
is what an IN or NOT IN translate to), and index the columns that are
I heared an advice (from Vadim, who implemented this) that IN is not
very effective. EXIST and correlated subqueries are much better.
definitely included in most where clauses on that table.
Should these indicies be created as compound index (CREATE INDEX myindex
ON TABLE mytable (field1, field2)) or separated
(
CREATE INDEX myindex1 ON TABLE mytable (field1)
CREATE INDEX myindex2 ON TABLE mytable (field2)
)
?
-DEJ
Oleg.
----
Oleg Broytmann http://members.xoom.com/phd2/ phd2@earthling.net
Programmers don't die, they just GOSUB without RETURN.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
grouppgsql-general @
categoriespostgresql
postedApr 16, '99 at 1:05p
activeApr 21, '99 at 10:29a
posts6
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase