Slow Query: matching criteria AND ordering by primary key

2002-07-02 Thread Tac
I have a table with a state field, and often I want to get only records matching those states, ordered. This simple query Select * from my_table where state='NJ' order by table_id DESC is relatively slow because of the order by clause (where there are a lot of matching records). I've

Re: Slow Query: matching criteria AND ordering by primary key

2002-07-02 Thread Paul DuBois
At 23:20 -0400 7/2/02, Tac wrote: I have a table with a state field, and often I want to get only records matching those states, ordered. This simple query Select * from my_table where state='NJ' order by table_id DESC is relatively slow because of the order by clause (where there are a