-
select doc_type, count(doc_type) doc_count from doc_master WHERE
sent_date between '01-AUG-01' AND '31-AUG-01' group by doc_type ;
The doc_master has about 40 million tables .there is an index on sent_date .the above querry uses the index also .
the above querry runs for about 16 min .Any suggestions to make it faster ...
Radhakrishnan.M
-
Several, actually.
First, it is important to know the database type:
DSS
-----
You can try:
- Parallel Query
- Partitioned Table
- Additional BITMAP index on doc_type
OLTP
------
Add doc_type to existing B*Tree index (the one that has sent_date) This field can either be first or second. You will want to seriously look at how your indexes are used to see if dt,sd or sd,dt or sd,dt/dt or dt,sd/sd will work best for you
HTH,
- Chris
-
And since this is a SQL question, I'm moving it to the Development forum.
- Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|