3 ms·
And parsing the query and generating a query plan for those 10 queries is obviously free.
by qaq 11y ago
And parsing the query and generating a query plan for those 10 queries is obviously free.
- marcosdumay 11y agoThat's often done once and cached. It is worth keeping one eye at those things. They can slow your program down badly, and go unnoticed a lot of times. But most of the time they don't slow you down at all, and when they do it's often much better to solve the problem by rewriting your queries into something that batches more data. Yes, once in a long while it makes sense to create a stored procedure to deal with it. But this is the exceptional situation that deserves explaining - not the other way around.
- ajmurmann 11y agoYou can also solve this with prepared statements which for example Active Record does for you for free.