Doubt on query execution speed.

  • Dear Experts,

    Suppose I have a Sales_table with a column called "CountryName". I don't have any index defined on this table. (Not even clustered index). There are somany records in this table. 10% records are with "CountryName='Australia'"

    My doubt is that, Will the query

    "Select * From Sales_table" run faster than the query

    "Select * From Sales_table where CountryName='Australia'"

    ???

    Please confirm.

    Thanks in advance.

  • Both will have to scan the complete table.

    The only ,noticeable, difference would be that amount of data that the non filtered version will return to the client.



    Clear Sky SQL
    My Blog[/url]

  • So ultimately, execution speed will be equal for both the queries....

  • I would expect the non filter to be slower , but only because of the amount of data that needs to be sent to the client. Not for any 'server' reason



    Clear Sky SQL
    My Blog[/url]

  • This was removed by the editor as SPAM

  • Please note: 7 year old thread.
    And those 'rules' are pretty useless.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply