DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Please help me tuning the query

Threaded View

  1. #2
    Join Date
    Nov 2001
    Location
    UK
    Posts
    152
    The index could be making things worse rather than better. With the conditions you've got and the fact that you are doing range scans rather than equality conditions, the only bit of the index which may be used is:

    WHERE state_name = 'STATE'
    AND zip_start <= 61601

    Is this a large proportion of the table (e.g. 50%+) ? If so, the index would be make the query worse rather than better. Make sure you have analyzed your table fully. Do an "analyze table ... for all columns" to get the histogram data to avoid a skewed index being used.
    Last edited by Scorby; 01-10-2006 at 12:26 PM. Reason: Add state to condition

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width