SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Clustered Index on mysql?

  1. #1
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    1,863
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Clustered Index on mysql?

    So this is becoming amazingly over complicated...
    I want a clustered table for fast read speed, (CUST_ID, ACTION_DATE) ASC

    This has to be a clustered table (rows are physically stored in this order) I'm getting an error of unknown storage engine 'ndbcluster' in mysql and can find no good documentation on it.

    Any help creating a clustered table on latest version of mysql please?
    <?php
    //Kyle Wolfe
    echo devBlog("My Dev Notes");

  2. #2
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,456
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    the NDBCLUSTER storage engine is used to enable running several MySQL servers in a cluster... not what you're looking for, i assume

    as far as i recall, innodb tables store rows in sequence based on the primary key

    however, for the fastest read speed, try myisam -- this has the disadvantage that it locks the table (not individual rows) for updates, though
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    1,863
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    So short answer is that mysql does not have the ability to use a clustered index on more than one column that is not the primary key?
    <?php
    //Kyle Wolfe
    echo devBlog("My Dev Notes");

  4. #4
    SQL Consultant silver trophybronze trophy
    SitePoint Award Recipient r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    38,456
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by K. Wolfe View Post
    So short answer is that mysql does not have the ability to use a clustered index on more than one column that is not the primary key?
    i cannot confirm this, but i expect it is so
    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
  •