Re: [libdbi-users] libdbi+mysql speed issues

2013-01-09 Thread markus . hoenicka
Olivier Doucet writes: > Performance are now correct :) I checked with valgrind / callgrind, > and function mysql_data_seek is not called anymore. > > You can now patch other drivers, and maybe release a new version ? I've updated the remaining drivers and the driver documentation. Did anyone

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-09 Thread Markus Hoenicka
Olivier Doucet was heard to say: >> Do you have any numbers? Would be nice to know what speed gain this >> (almost) one-line optimization effected. > > I've done a benchmark with rrdtool that uses libdbi. > http://tof.canardpc.com/view/31953cab-4329-45e9-9e30-eed2d9148ee1.jpg > max value on X-Axi

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-09 Thread Olivier Doucet
> libdbi-drivers uses the mysql_config script shipped with MySQL to > obtain the list of required libraries to link against, *unless* you > use the --with-mysql-libdir configure switch. Yes I was using this configure switch. I copied configure line from Red Hat SRPM. > Do you have any numbers? Wou

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-09 Thread Markus Hoenicka
Olivier Doucet was heard to say: Hi, > I finally succeeded in compiling both component for my system (I added > flag -lpthread when both linking / compiling or else I have following > error : '/usr/lib64/dbd/libdbdmysql.so: undefined symbol: > pthread_mutex_trylock'). libdbi-drivers uses the my

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-09 Thread Olivier Doucet
Hello, > I've implemented the suggested changes and checked in the updated > files. If you want to speed test the code, please check out, build, > and install the current cvs revisions of both libdbi and > libdbi-drivers. I finally succeeded in compiling both component for my system (I added flag

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread markus . hoenicka
Markus Hoenicka writes: > Hi, > > I'll have to read the code again a little more thoroughly, but to the > best of my knowledge libdbi emulates MySQL's approach to retrieving > rows from result sets. In order to walk through the rows of e.g. a > PostgreSQL result set you have to retriev

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Markus Hoenicka
Mike Rylander was heard to say: > Markus, > > Would it be worth the ugliness of a module-global variable to bury the > value of the row index used in the previous call to > dbd_mysql.c::dbd_goto_row() > inside the MySQL driver itself, side-stepping the function signature change > for other dri

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Mike Rylander
Markus, Would it be worth the ugliness of a module-global variable to bury the value of the row index used in the previous call to dbd_mysql.c::dbd_goto_row() inside the MySQL driver itself, side-stepping the function signature change for other drivers? The benefit of avoiding the API change may

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Markus Hoenicka
Olivier Doucet was heard to say: > Hi Markus, > > 2013/1/8 Markus Hoenicka : >> We could modify the driver function >> dbd_goto_row() by passing both the wanted row index rowidx and the >> current row index currowidx(which libdbi keeps track of anyway). > > This is one way to fix the problem, I a

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Olivier Doucet
Hi Markus, 2013/1/8 Markus Hoenicka : > We could modify the driver function > dbd_goto_row() by passing both the wanted row index rowidx and the > current row index currowidx(which libdbi keeps track of anyway). This is one way to fix the problem, I agree. Unfortunately my level in C is too low t

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Markus Hoenicka
Olivier Doucet was heard to say: > Hello everyone, > > I'm following a quite old topic about libdbi speed issues. > I was able to track the cause of these issues : The major problem is > how libdbi goes from one row to another. > > RRDTool (the tool that used libdbi and that I was inspecting) is

Re: [libdbi-users] libdbi+mysql speed issues

2013-01-07 Thread Olivier Doucet
Hello everyone, I'm following a quite old topic about libdbi speed issues. I was able to track the cause of these issues : The major problem is how libdbi goes from one row to another. RRDTool (the tool that used libdbi and that I was inspecting) is using dbi_result_next_row() function (as stated

Re: [libdbi-users] libdbi+mysql speed issues

2011-07-09 Thread Adam Jacob Muller
Hi Markus, I definitely can, anecdotal evidence suggests to me that this issue does not occur on postgres (I use rrdtool+postgres similarly and havne't seen the issue), but I'll make some actual tests and report back. -Adam On Jul 9, 2011, at 8:39 AM, markus.hoeni...@mhoenicka.de wrote: > Ad