SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Nov 2004
    Location
    St Petersburg, Russia
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    indexes on two varchar columns

    I have read that if you create index on two columns ("index (col1, col2)") the columns are concatenated. But if I have 2 varchar columns and I have the following rows:
    'abc', 'd'
    'ab', 'cd'
    does it mean that I have index 'abcd' for both of this rows. If so the usefulnes of such index will be very limited.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    no, it means you have an index with the values --

    'abc', 'd'
    'ab', 'cd'
    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
  •