2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta: > At 4:53 PM +0100 3/22/07, Németh Zoltán wrote: > >2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta: > > > > > As for efficiency, that's probably not even worth mentioning in this case. > > > >why not? you would use 2 sql queries while I would use one most of the > >time and 2 in case of already reserved ID - that is almost twice as much > >processor time > >that may count much if the routine is used frequently > > Go ahead, try it, and tell me how much time it cost. it would be an interesting benchmark, timing it on some 100000 runs or like that, if I'll have some time I promise I'll do it :) > > From experience, there are things one can spend > their time optimizing and there are other things > that one should be able to see that aren't worth > pursing. yes, it's true. as for the current thing, I do not have experience or benchmarks, so you may be right that it does not worth the energy. I said what I said out of logic, which says that 2 queries are slower than 1 query ;) > > I've been wrong before, but you're open to prove me wrong again, if you like. when I'll have some free time (probably not in the next couple of weeks...) I think I'll try to benchmark it - and we'll see whether the difference is worth mentioning or not :) but if anyone has (or you have) existing benchmarks please show me, I'm interested in it greets Zoltán Németh > > Cheers, > > tedd > -- > ------- > http://sperling.com http://ancientstones.com http://earthstones.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php