
git checkout 1.1.dev
git branch 1.1.dev.so
git checkout 1.1.dev git merge 1.1.dev.so
Quote from: splittingred at Mar 30, 2012, 08:30 AMQuote from: sottwell at Mar 29, 2012, 10:20 PMFrom research that I've done on the subject, any complex query is going to require horrendous amounts of work to build, either on the back-end or on the part of the programmer. The major problem with the libraries that support "simplified" complex query building is that invariably you'll want to do something that is not covered by the library's API and you'll end up with hand-coding the query anyway. And, of course, the second point is that these APIs are necessarily large and heavy, which is of questionable use in 99% of cases. So it comes down to a question of optimization. Carry an elephant gun everywhere you go to swat the mosquitoes with, just on the off chance you'll run into a rogue elephant, or carry a flyswatter and dig an elephant trap if there's a rogue in the neighborhood.
This is why xPDO is superior; it has driver-specific classes that you can write methods for to run specific queries for various DB drivers, without having to run switch statements.
xPDO can also handle many edge cases with complex SQL statements via its nested array syntax and conditional prefixing in the xPDOQuery->where() command.
Yes, that is something that ORM are for. But you are using an interpreted language (PHP) for parsing and creating database queries.
You'll never be on the fast side with this constructs. Comparing C and/or Assembler compiled sources against interpreted languages, the interpreted language will loose the race. That means: The database takes it all.
You might come up a little bit using things like using HipHop, but then you have a complex build process. In addition HipHop does it only with MySQL and not all PHP commands are supported.
There will be an other player with compiled PHP, but it is not ready by now. The article on heise.de is only available in English, but Google Tranlate might help:
http://translate.google.com/translate?sl=de&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2Fwww.heise.de%2Fnewsticker%2Fmeldung%2FFabric-Engine-bringt-JavaScript-auf-C-Niveau-1495054.html
My meaning is: Let the database do what databases are for.
And yes, this is more work on the development side, and yes you need people who know what they are doing on databases.
This discussion is closed to further replies. Keep calm and carry on.