Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2005
    Posts
    63

    Unanswered: WHERE clause optimization

    If the column used in the where clause is indexed, which one of the following is more ideal so it uses the index optimally:

    1. WHERE Status != 0

    EXPLAIN RESULTS:
    select_type: SIMPLE
    type: range
    possible_keys: PRIMARY
    key: PRIMARY
    key_len: 1
    ref: null
    rows: 3
    Extra: Using where


    2. WHERE Status > 0

    EXPLAIN RESULTS:
    The only difference from the above results is:
    rows: 2

    but I do not know what rows stand for.

    Thanks,
    Last edited by screenmates; 03-03-06 at 01:29.

Posting Permissions

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