I'm using mysql.mod with eggdrop 1.6.17+ssl patch. When executing queries through the script, i can see the mysqld process use upto 25% cpu in "top", takes about a min or so to return data back to script. Even a simple select query which takes 0.01secs when run directly using mysql client takes over a min to process via the script. Tho, data is returned.
I can't figure out what i'm doing wrong here. Any help on debugging this would be appreciated.
MySQL db has about 1.5mil records in it, is indexed. same query when ran via mysqlclient takes 0.01secs to execute as compared to over 1min from the tcl script when ran using mysql.mod.
mysql_query does have to convert the entire result into a Tcl list of lists, so it might just take a while. If that's the case, it's Tcl overhead, and will be equally slow using mysqltcl and fetching all of the rows. I would, of course, be interested in knowing what you find out.