473,382 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

MySQL / ADODB

Hi all,

I've taken on a massive project for a client recently and now I've hit
some bug fixes that are required (3rd party code). and was just wondering
about peoples opinions / personal findings.

This set of scripts for the section of the project use an ADODB class for
MySQL. I've never used this method before (I wrote a class a while back to
handle my MySQL core code which was mainly a wrapper for various mysql_*()
functions etc). The original query with the ADODB used code was hanging on
retrieving 19k rows. I managed to locate the bug here by introducing a
LIMIT of 1000 which then worked (although obviously a lot of data was
missing, it didn't hang and the results that were expected were
displayed). Removing the LIMIT again produces the hang situation again.

I stripped out that particular piece of ADODB class code and replaced it
with straight-forward mysql_*() calls wich retrieves all the data (all 19k
rows) with no issues whatsoever.

My query, is ADODB known to be slower / more resource intensive than
straight mysql_*() calls via a mysql_connect() connection? Version info
for this is:
* @version V1.20 25 June 2001 (c) 2000, 2001 John Lim
[email address removed]
Unfortunately, due to the bad coding style of this part of the project
(was "off the shelf" purchased code by the client) and the abominal use of
'global', I have a fair amount of work ahead of me I think as now I'm
pulling errors regarding functions of unknown members in other sections
of this code.

Anyways, just looking for opinions of people that may have experienced
this kind of behaviour personally before.

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #1
4 2417
On Tue, 17 Aug 2004 20:42:09 GMT, "Ian.H" <ia*@WINDOZEdigiserv.net> wrote:
My query, is ADODB known to be slower / more resource intensive than
straight mysql_*() calls via a mysql_connect() connection?


I remember seeing a post with benchmarks, I think this is it:

http://groups.google.com/groups?selm...&output=gplain

ADODB by definition has to be at least a little slower than raw mysql calls,
doesn't it, since it's a wrapper around those calls so is simply running more
code in order to get you a more encapsulated/consistent interface?

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
On Tue, 17 Aug 2004 22:01:42 +0100, Andy Hassall wrote:
On Tue, 17 Aug 2004 20:42:09 GMT, "Ian.H" <ia*@WINDOZEdigiserv.net>
wrote:
My query, is ADODB known to be slower / more resource intensive than
straight mysql_*() calls via a mysql_connect() connection?
I remember seeing a post with benchmarks, I think this is it:

http://groups.google.com/groups?selm...&output=gplain

Thanks Andy, looks interesting =)

ADODB by definition has to be at least a little slower than raw mysql
calls,
doesn't it, since it's a wrapper around those calls so is simply running
more code in order to get you a more encapsulated/consistent interface?

True; although was more thinking along the lines of why it was _so_ slow
that it caused hangs (had to hit 'stop' quick before it screwed over the
SQL process) whereas the wrapper I coded some time ago will happily fetch20k rows without question.


This part of the project is to be replaced soon but need to patch it for
the time being while other areas are sorted beforehand. Looks like fun and
games ahead fixing this!

Thanks again =)

Regards,

Ian
--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #3
On Tue, 17 Aug 2004 21:10:59 GMT, "Ian.H" <ia*@WINDOZEdigiserv.net> wrote:
On Tue, 17 Aug 2004 22:01:42 +0100, Andy Hassall wrote:
On Tue, 17 Aug 2004 20:42:09 GMT, "Ian.H" <ia*@WINDOZEdigiserv.net> wrote:
My query, is ADODB known to be slower / more resource intensive than
straight mysql_*() calls via a mysql_connect() connection?


I remember seeing a post with benchmarks, I think this is it:

http://groups.google.com/groups?selm...&output=gplain


Thanks Andy, looks interesting =)
ADODB by definition has to be at least a little slower than raw mysql
calls, doesn't it, since it's a wrapper around those calls so is simply running
more code in order to get you a more encapsulated/consistent interface?


True; although was more thinking along the lines of why it was _so_ slow
that it caused hangs (had to hit 'stop' quick before it screwed over the
SQL process) whereas the wrapper I coded some time ago will happily fetch
20k rows without question.


At least according to that benchmark ADODB fares quite well as far as
performance goes.

Been meaning to have a look at the PHP database abstraction layers as I'm soon
going to be starting to civilise an intranet at work, moving away from ASP+ADO
to PHP+OCI8, and a little bit of syntactic sugar around the OCI interface might
be nice. What's your opinion on ADODB vs. PEAR DB?

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #4
On Tue, 17 Aug 2004 22:58:51 +0100, Andy Hassall wrote:
True; although was more thinking along the lines of why it was _so_ slow
that it caused hangs (had to hit 'stop' quick before it screwed over the
SQL process) whereas the wrapper I coded some time ago will happily fetch
20k rows without question.

At least according to that benchmark ADODB fares quite well as far as
performance goes.

I ened up stripping some of the ADODB code in favour of plain mysql_*()
calls which seems to have solved the issue for the time being. It's not
pretty, but it's not falling over anymore. Should survive until the recode
anyway.

Been meaning to have a look at the PHP database abstraction layers as I'm soon
going to be starting to civilise an intranet at work, moving away from ASP+ADO
to PHP+OCI8, and a little bit of syntactic sugar around the OCI interface might
be nice. What's your opinion on ADODB vs. PEAR DB?

Couldn't really comment Andy tbh as I've not had much dealing with the
PEAR DB.. not in my own code anyway and not sure I've had much dealing
with it elsewhere either.. a lot of the code I deal with is custom coded.

There's not much I've made use of from PEAR in general.. apart from the
XML_Tree module which I tried recently as part of an experiment for
something (it was dog slow on a file > 5000 lines of _really_ simple XML)
I don't think I touched much else from the repository (wish it was more
like cpan).

Saying that, I have a feeling that the Horde framework and IMP use the
PEAR DB. If this is the case, I've never had an issue with Horde / IMP in
the 18 months I've been running it (used for about 100 accounts) over both
HTTP and HTTPS.

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Phil Powell | last post by:
I've read some online resources that utilize various MySQL command-line actions to migrate data from Access to MySQL. The situation is this: a group of co-workers of mine will be using an Access...
5
by: Stuart Mueller | last post by:
I have a mySQL database, called clients it has a single table called client with 2325 records in it. It was originally an Access database but I have exported it to mySQL. I have created a system...
0
by: M.C. Scheffers | last post by:
Hello all, I'm developing an VB application which uses the SAX parser and ADO VB to insert.update data in in MySQL. The perormance is very bad. If I use the same data and insert/update to a MS...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
2
by: DJJ | last post by:
Does anyone know how to create a recordset using MS Access 2003, ADO & MySQL ODBC that can be edited? The following code only returns a recordset that cannot be edited Private Sub...
3
by: frizzle | last post by:
Hi there, I was wondering the folllowing: when i insert something into a mySQL DB -in a guestbook for instance- i mostly use mysql_escape_string($_POST['comment'). now i've seen...
0
by: Daniel Crespo | last post by:
Hi to all, I'm using adodb for accessing mysql and postgres. My problem relies on the mysql access. Sometimes, when I try to execute a query (using ExecTrans method below), I get this error:...
8
by: Dodong | last post by:
Last month I posted a question on what is the VB code to know if a table is existing in MySQL, but I have not receive any reply. I hope that the following code will help the reader determine what is...
3
by: janetopps | last post by:
I have a news website, with asp pages, which was on Access, and i upgraded to MySQL, i used Bullzip to transfer the data. It had about 1000 pages, which im now able to pull up on the public side. Im...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.