SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    table index fields are important or not?

    hi there

    On the phpmyadmin tool, when is about adding a new field, you have the option to choose the place of tat field in your table. Seeing this, i got a question in my mind: Te order of the fields in a table, is important? Indexe fields have to be at the begining of the table or something like that?

    If this is a rule to follow, this will affect speed of the interogations or it is about good practices only?

    Also, is there any fields order rule to follow when I specify the conditions on WHERE part of the query?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,022
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by dole.doug View Post
    Te order of the fields in a table, is important? Indexe fields have to be at the begining of the table or something like that?
    no, and no

    the only columns (not fields) that should be indexed are those which are used in queries for searching or joining
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

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