Re: Re: [metabase-dev] RE: [PEAR-DEV] Re: [binarycloud-dev]FW: letstalk "metapear" - politics aside:-)

From: Date: Thu, 21 Mar 2002 15:26:46 +0000
Subject: Re: Re: [metabase-dev] RE: [PEAR-DEV] Re: [binarycloud-dev]FW: letstalk "metapear" - politics aside:-)
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5068@lists.php.net to get a copy of this message
Hi Graeme, Thanks for the thoughtful remarks. Graeme Merrall <GBMerrall@aol.com> wrote in message news:3C97D2E2.4080501@aol.com... > > > Strangely enough, I recently benchmarked binding of variables and got some > > strange results. They were 6 times slower than sending pure sql. > > > > For more details, see: > > http://php.weblogs.com/oracle_mysql_performance > > Looking over your article, I noticed a couple of issues relating to Oracle. > It appears to me that you're comparing Oranges and Apples running this > benchmark suite. There's a whole other flame war here - just refer to > any flame on mySQL vs postgres :) This article is actually not mysql vs oracle. It's about how to perform processing of large numbers of records quickly. A potential customer wanted us to speed up their batch processing. The daily job is taking 12 hours to process several million records (in an Oracle database running on a 12-CPU HP server) so I did these benchmarks to get a feel of the problem. That's why I benchmark not using a database and simply using associative arrays also. I use both db's - oracle with transactions and mysql for fast data access for info that rarely changes (typical web data). It's about choosing the right tool for the right job. > Short response: mySQL is built for speed and is pretty much does that > right out of the box. Oracle is built for size. It's huge out of the > box and it's designed to be very huge. Add to that, your application > server, Intermedia, various Java/XML bolt-ons and you've got yerself a > pretty big install. Add to that the fact that Oracle DBA's make money > for a good reason - Oracle needs lots of tuning. > Sure Oracle is going to be generally slower than mySQL because it's a > whole other beast - something you've already pointed out yourself. > Actually Oracle will be faster under many situations. The better your hardware, the more hard disks you have, the more tweaks you can apply that you cannot in MySQL. > A couple of other items spring to mind though. Obviously you connected > through the listener over the network. How much faster is it if you go > through the MTS Dispatcher? MTS in general will be slower because less memory is allocated, and the sessions are constantly switched. For my task of handling lots of records, you want permanent sessions that do not use MTS. MTS is about saving memory (eg. instead of 5 Mb per connection, perhaps 250K with MTS), not speed. > While I note that Thies generally has a pretty good advantage spped-wise > with his bound variables, our databases here generally show a much lower > gain in performance. Possibly because our DBA has tuned the bejesus out > of Oracle so queries run well generally. > Thies benchmark does not use tables with indexes, and only has one bind variable. Testing on a table with 1 index and 3 bind variables, I only got a 30% improvement. > How much faster is native Oracle functions over using ADOdb? > Depends on the SQL and PHP version. I have benchmarked 15-30% overhead, depending on the queries. > I usually don't get on my hobby horse about benchmarks. There are > usually plenty of people to do it for me :) but in this case I feel I > have to point out these inconsistencies. > True, you need some discernment and knowledge to make use of benchmarks. Benchmarks only give you a feel for the problem. The rest is extrapolation. > I see Thies has provided some test code. How does this code benchmark? > I posted it already to this newsgroup. See my response. Regards, John > Cheers, > Graeme >

« previous php.pear.dev (#5068) next »