Friday, September 18, 2015

Cost is very few but Query Execution time is very High.

Today I find in my database one query is taking long time to execute, after the investigation I have seen Plan Cost is very low but it's taking huge time to execute.

Problem : In table there are two index both are composite Index. One is composite with two column in which value of one column in only one distinct value within 32 Million and another column contain null value in more then 29 Millions row for that Cardinality was more then 29 Millions and it takes too much long time to execute.

Solution: I have remove this index and Plan taking another index to Execute the Query.





No comments:

Post a Comment