SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Maximizing a table for tons of data inserts

    I'm going to be inserting MASSIVE amounts of data into a mysql tables.
    The data will be processed later and reports will be generated.

    To speed up the inserting of the data, should I
    remove indexing ?
    remove autoincrement ?

    I have no real use for the autoincrements. I plan to add indexing when generating reports. Does the plan make sense ?

  2. #2
    SitePoint Guru
    Join Date
    Aug 2003
    Location
    CT
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    indexing will slow down inserts but speed up selects.

    if this is a one-time insert process, I would insert the data first, then add the index to the column.

    I dont think theres a big performance hit with the auto_inc, but i could be wrong. Do you have another primary key available?

  3. #3
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    if you don't need the autoincrement, then absolutely delete the autoincrement column.

    are you going to be deleting the data each time you run the reports?
    how many rows are in the input table?
    how many reports?
    do these reports have where clauses?
    how many output rows for each report?


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
  •