RE: [GENERAL] Optimal indicies

1999-04-21 Thread Remigiusz Sokolowski
Btw. of indices: is there a way to add to index boolean type? I have a table from which I get records with clause where on four columns. One is text, second is int and two other are bool. I need to get data from this table in most effective way, but for now have no indices cause when I try bool_o

RE: [GENERAL] Optimal indicies

1999-04-21 Thread Oleg Broytmann
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

RE: [GENERAL] Optimal indicies

1999-04-20 Thread Jackson, DeJuan
> Hi! > > On Fri, 16 Apr 1999, Jackson, DeJuan wrote: > > try: > > EXPLAIN SELECT pos_id, rating > > FROM pos_rating pr > > WHERE date_i = current_date AND city_id = 2 AND > > EXISTS (SELECT DISTINCT pos_id FROM positions p WHERE subsec_id = 1 AND > > status = 'A' AND pr.pos_id=p.pos_id) > >