This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

slow queries with mysql.mod

Discussion of Eggdrop's code and module programming in C.
Post Reply
p
paindoo
Voice
Posts: 3
Joined: Fri Apr 07, 2006 4:58 pm

slow queries with mysql.mod

Post by paindoo »

Hello,

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.

Thanks,
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

try mysqltcl
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
BarkerJr
Op
Posts: 104
Joined: Sun Mar 30, 2003 1:25 am
Contact:

Post by BarkerJr »

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.
Post Reply