1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

what the difference between Create single-column index & Create composite index

Discussion in 'MySQL' started by dineshsingh1984, Nov 14, 2015.

  1. #1
    what the difference between Create single-column index & Create composite index in mysql. when we create the table and assign index then show two option :
    1>Create single-column index,
    2>Create composite index.
     
    dineshsingh1984, Nov 14, 2015 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Composite index is an index on multiple columns. In a WHERE clause, it will be used if either the first column is a condition or both columns are a condition, but not if only the second column is a condition.
     
    jestep, Nov 16, 2015 IP