How do I print all the queries in Magento?

后端 未结 6 1886

Is it possible to display all the query strings in Magento? I really like to see what queries are executed.

Thanks

6条回答
  •  心在旅途
    2020-12-07 15:27

    The queries will vary significantly depending on your activities. If you have some control over your MySQL server, try turning on query logging:

    set global general_log = on
    

    Then you can get the SQL log to see queries. As a word or warning, Magento tends to execute dozens of queries on every page load, and hundreds to save an object.

    Thanks, Joe

提交回复
热议问题