[eluser]theprodigy[/eluser]
Quote:—it is slower than writing your own string
This would be true of ANY wrapper, not just AR.
Also, using a framework is slower than writing straight PHP. So why use anything at all?
Quote:—you avoid optimizing your queries because to do so doesn’t fit naturally into AR functions, and it is harder to spot the places where you should optimize
Sometimes (not always), it is quicker to run 2 queries then to run one complex one.
Depends on whether you are looking for speed or number of hits to the db.
Quote:—it is harder to debug
Yes and no. Most of the time, the bugs come from leaving out a part of the query (which is easy to spot with or without AR), or because a variable does not contain what you think it does (which would throw an error either way).
Plus, I don't exactly agree with this statement. It all boils down to coding style. I could write something in AR, that is much easier to read than trying to write it concatenating a string to do straight sql.
Plus, the only thing a non-sql person has to do is write their query in AR, echo $this->db->last_query(), copy it, and then replace the AR code with what they copied. Now, they have the benefit of faster code, and STILL not knowing how to write SQL, AND it has the benefit of CI's escaping, that some SQL writers forget about.