2 ms·
The comparison of the code in the article is a little unfair, though. You have to prepare a statement, bind some values to it, and then convert engine-specific
by wruza 10y ago
The comparison of the code in the article is a little unfair, though. You have to prepare a statement, bind some values to it, and then convert engine-specific data in a loop into your language's representation. Of course DB-modules help with that, but the boilerplate complexity remains.
- btilly 10y agoThe boilerplate is manageable. And with the right DB-modules, it practically disappears. That said, do try to rewrite a moderately complex query without SQL. Pick one with multiple joins, several where conditions, and a group by. You will generally wind up with a fragile program that is many times as big as the equivalent SQL, and is a lot harder to read and maintain.