Re: paging methodology

From: Date: Wed, 05 May 2004 19:17:16 +0000
Subject: Re: paging methodology
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-185478@lists.php.net to get a copy of this message
From: "Chris W. Parker" <cparker@swatgear.com> > on a related note... how does BENCHMARK() work? i don't understand their > explanation. the reason i ask is because i'd like to test our the > efficiency of what you are suggesting compared to what i am currently > doing. > > SELECT BENCHMARK(500, 'SELECT * FROM table'); > > although that didn't throw an error, it didn't seem to do anything > either. Getting OT here... From what I understand, you can't use complete queries in benchmark, only "expressions". So, what you're actually benchmarking there is setting a string, I guess. You can use it for something like this, though: SELECT BENCHMARK(500000,5 BETWEEN 0 AND 10); and... SELECT BENCHMARK(500000,0 < 5 AND 5 < 10); to see which method MySQL handles faster (between benchmarks faster, although I've always been lead to believe the < and < method is faster). I don't know if i'd really interpret much from the results, though.. ---John Holmes...

« previous php.general (#185478) next »