Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Slow script: DBI, MySQL, or just too much data?

by menolly (Hermit)
on Apr 15, 2005 at 18:09 UTC ( #448286=note: print w/replies, xml ) Need Help??


in reply to Re^3: Slow script: DBI, MySQL, or just too much data?
in thread Slow script: DBI, MySQL, or just too much data?

testDBToMCQDB, which is where we've had the most optimize problems, has 9 columns, a 2-colum primary key, and ~8.5 million rows. It's a MyISAM table, and has four indexes -- the primary key, 2 single-column indices, and one with the same cols as the key, but in opposite order -- these were all created to speed up select statements which were causing problems.
I expect this script to delete something like 40% of the data from each table.
  • Comment on Re^4: Slow script: DBI, MySQL, or just too much data?

Replies are listed 'Best First'.
Re^5: Slow script: DBI, MySQL, or just too much data?
by dragonchild (Archbishop) on Apr 15, 2005 at 18:11 UTC
    drop the indices, delete the columns, optimize the table, create the indices. You'll find a roughly 70% speedup.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://448286]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2020-10-30 20:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (284 votes). Check out past polls.

    Notices?