Home » RDBMS Server » Server Administration » Urgent Problem in performance of a query
Urgent Problem in performance of a query [message #54534] Wed, 20 November 2002 19:24 Go to next message
subodh
Messages: 1
Registered: November 2002
Junior Member
There is a table with 50 million records. Data stored in this table is on weekly basis. Users evaluate data thru this query on monthly basis. So I have to use date range instead of exact date in the query. This table has a primary key consisting of five column. The lead column on this primary key is the week-end_date. In my query, I'm including all the primary key columns in exact same order as in primary key, but giving date range of 4 weeks instead of exact match. The query is taking more than 30 sec(which is not acceptable), whereas if I give exact date then I'm getting results within no time. I checked the explain plan, cost it was giving 42,600 for date range and only 4 for exact date. Also Explain plan was telling that it was using different index other than primary key. When I tried to force primary key index, cost shoot upto nearly 80,000. I really don't know now what to d. And I have to use date range. Table is analyzed. What I'm looking for is the explanation why it is happening. If anyone has faced such kind of problem, please do share with me. I'll appreciate it. Thanks in advance
Subodh
Re: Urgent Problem in performance of a query [message #54535 is a reply to message #54534] Wed, 20 November 2002 20:23 Go to previous message
rajesh
Messages: 173
Registered: November 1998
Senior Member
I would like to suggest you Table partitioning as data is increasing in regular basis so it will definately help you.
Regards
Previous Topic: Re: remote connecting oracle and MS Access
Next Topic: how to use autotrace
Goto Forum:
  


Current Time: Thu Sep 19 18:12:47 CDT 2024