|Keep It Simple, Stupid|
DBI speed up needed on MySQLby jacques (Priest)
|on May 08, 2005 at 03:30 UTC||Need Help??|
jacques has asked for the
wisdom of the Perl Monks concerning the following question:
This DBI statement is taking too long and I need to speed things up:
I have about 40,000 rows with each row containing about 200 fields. My program hangs for a loooooong time. So I know I have a few options:
1. Use indexes.
I created two indexes but didn't notice any speed improvement:
Should I create a different type of index? Those are the SQL statements that I used.
The other option is to use fetchrow_arrayref. But I *need* to have $result as a hash ref. Would it be okay to convert the array ref to a hash ref? What would be the best way to do that?
I heard that fetchrow_arrayref is way faster than its hashref counterpart.
Any other things that I could try?