I am not quite sure if this should go in the MySQL section or here, but I am guessing here, as I think it is more of a PHP issue that an SQL issue.
I am trying to load / grab / select around 200,000 records from a table via PHP at it is taking on average 8 seconds. I really need to get this down, but can't figure out how to optimize it any more than I already have.
Table:
spell_langid = smallint (index)
hash = int
flags = int
Total rows size = 17 bytes
# rows = 268,449
# rows wanted = ~200,000
PHP:
I have already tried it via files, but the database was quicker than files... Am I just up a creek without a paddle, or what? Anybody have any ideas?
Thanks!
Nikki
I am trying to load / grab / select around 200,000 records from a table via PHP at it is taking on average 8 seconds. I really need to get this down, but can't figure out how to optimize it any more than I already have.
Table:
spell_langid = smallint (index)
hash = int
flags = int
Total rows size = 17 bytes
# rows = 268,449
# rows wanted = ~200,000
PHP:
PHP Code:
$words=$DB_site->query("SELECT hash, flags
FROM spell_hash
WHERE spell_langid = $lang_id");
while (list($hash, $flags) = $DB_site->fetch_array($words)) {
$this->hashes["$hash"] = $flags;
}
Thanks!
Nikki
Comment