Re: [PERFORM] Checking = with timestamp field is slow

2004-11-05 Thread Michael Glaesemann
On Nov 5, 2004, at 4:16 PM, Antony Paul wrote: where today::date = '2004-11-05'; This is the only condition in the query. There is a btree index on the column today. Is there any way to optimise it. I'm sure others out there have better ideas, but you might want to try where current_date = date

Re: [PERFORM] Checking = with timestamp field is slow

2004-11-05 Thread Michael Fuhr
On Fri, Nov 05, 2004 at 12:46:20PM +0530, Antony Paul wrote: I have a table which have more than 20 records. I need to get the records which matches like this where today::date = '2004-11-05'; This is the only condition in the query. There is a btree index on the column today. Is

Re: [PERFORM] Checking = with timestamp field is slow

2004-11-05 Thread Andrew McMillan
On Fri, 2004-11-05 at 12:46 +0530, Antony Paul wrote: Hi all, I have a table which have more than 20 records. I need to get the records which matches like this where today::date = '2004-11-05'; This is the only condition in the query. There is a btree index on the column today.

Re: [PERFORM] Checking = with timestamp field is slow

2004-11-05 Thread Michael Fuhr
On Fri, Nov 05, 2004 at 05:32:49PM +0900, Michael Glaesemann wrote: On Nov 5, 2004, at 5:14 PM, Michael Glaesemann wrote: On Nov 5, 2004, at 4:16 PM, Antony Paul wrote: where today::date = '2004-11-05'; This is the only condition in the query. There is a btree index on the column

Re: [PERFORM] Checking = with timestamp field is slow

2004-11-05 Thread Christopher Browne
After a long battle with technology, [EMAIL PROTECTED] (Antony Paul), an earthling, wrote: Hi all, I have a table which have more than 20 records. I need to get the records which matches like this where today::date = '2004-11-05'; This is the only condition in the query. There is a

Re: [PERFORM] Checking = with timestamp field is slow

2004-11-05 Thread Michael Fuhr
On Fri, Nov 05, 2004 at 07:47:54AM -0500, Christopher Browne wrote: How about changing the criterion to: where today between '2004-11-05' and '2004-11-06'; That ought to make use of the index on today. Yes it should, but it'll also return records that have a today value of '2004-11-06

[PERFORM] Checking = with timestamp field is slow

2004-11-04 Thread Antony Paul
Hi all, I have a table which have more than 20 records. I need to get the records which matches like this where today::date = '2004-11-05'; This is the only condition in the query. There is a btree index on the column today. Is there any way to optimise it. rgds Antony Paul