Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Speed of mysql query

    Is there a difference between the speed of these two queries

    Code:
    SELECT * FROM table WHERE field1='blabla' and field2='blabla'
    Code:
    SELECT * FROM table WHERE field2='blabla' and field1='blabla'

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Shouldn't be.

    Speed differences could occur based on what fields are indexed. But if the same field (or fields) are indexed in both versions, speed should be identical or nearly so.


  •  

    Posting Permissions

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