Re: Optimizing WHERE computations
Thank you Kim and Felix, brilliant. Wonder how the manual misses this!
I have another question about DISTINCT selections on datetime fields.
My SQL: "select count(distinct add_date) from articles;"
There is a composite index on add_date, where add_date is first. The EXPLAIN gives me this:
Type: Index
Possible keys: NULL
Key: idx_date_user_article
Key_len: 60
Ref: NULL
Rows: 800,000 (full table scan)
Where: Using index
The query still takes 4-5 seconds despite "Using index". What am I missing?
Subject
Views
Written By
Posted
2242
May 30, 2005 11:48AM
1557
May 30, 2005 06:52PM
1722
May 31, 2005 04:52AM
1575
May 31, 2005 05:35AM
1591
May 31, 2005 07:08AM
1187
May 31, 2005 07:11AM
1679
May 31, 2005 10:45AM
1860
May 31, 2005 07:19PM
Re: Optimizing WHERE computations
1671
June 01, 2005 08:53AM
1624
June 02, 2005 06:41PM
1697
June 02, 2005 09:20PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.