I'm really struggling to reduce the number of database queries on a Cartthrob install.

As I look at the EE output profiler, I see that most of the queries are

UPDATE `exp_cartthrob_cart` SET `cart` = ........

Being called from the Cart Model and the update_cart() method.

From my research, the query will happen whenever save_cart() or save() methods are called, which happens very often.

As the size of my cart increases the number of queries gets really high. I've seen over 100 of the same looking query.

I've tried optimizing my templates, but even adding 1 tag such as {exp:cartthrob:checkout_form} or {exp:cartthrob:cart_items_info} can add 30 or so of these update queries.

There has to be a way to reduce these, but it's beyond my skill to find. I'd appreciate any advice or assistance you may have.

This question is similar to How to prevent CartThrob from making hundreds of SQL queries and running extremely slow?

1 Answer 1


Following up on my own question here—I've been communicating with Cart Throb and they are optimizing a few methods that will reduce the number of queries in a future release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.