DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Query running slower on new server

  1. #11
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Tamil, that depends how (block)-selective "WHERE typeid <> 0" is. My [guess] above is that it isn't selective.

    I did wonder about creating an index with EVERY column referenced in the query - do it with an IFFS . . . . !

  2. #12
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Your guess may be right or wrong.
    We do not know selectivity of the column (or even block selectivity). I do not agree with you for creating an index on all columns used in group by clause + columns in select.
    If you do it, then the index will become big, that leads to space wastage.

    Tamil

  3. #13
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Hi Tamil,
    Originally posted by tamilselvan
    Your guess may be right or wrong.
    We do not know selectivity of the column (or even block selectivity).
    So might yours! I'd do a quick "count(*) where type_ip <> 0" to get a feel of it before creating and analyzing indexes.
    (teriyaki probably knows the answer).

    Originally posted by tamilselvan
    I do not agree with you for creating an index on all columns used in group by clause + columns in select.

    If you do it, then the index will become big, that leads to space wastage.
    Sorry, British humour - this was not really a serious suggestion.

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