Problem solve Get help with specific problems with your technologies, process and projects.

Query on primary keys takes too long

I have a table which keeps details of all cars along major highways. Each year, approximately 72 million rows are added. A query on particular county, station number, lane number and date, which is concatenated as mnth||day||yr takes a long time to retrieve a large result set. All the above are a part of PK, in addition to vehicle code, etc. An index on station number, filenum exists. I have tried a function-based index. This does not seem to help.
Depending on your DBMS, I recommend doing some searches within the vendor's devnet areas looking for hints on performance tuning. Also check out the InnerCore at www.coreintegration.com for ideas and/or post your query. But get specific on the installation. What DBMS, what version, size of the dimension tables, what is the query tool, etc.
This was last published in March 2005

Dig Deeper on Oracle and SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.