The basic technique of logging queries is that if SAVEQUERIES constant is defined to be true (it’s not by default for performance reasons) then $wpdb->queries will keep the log of queries performed.
There isn’t anything on top of this that WordPress natively does. There are plenty of plugins around which work either by interpreting this data, or implementing additional data collection. Latter can get pretty intricate to implement and only done in more elaborate debug plugins.
Related Posts:
- What’s the best way to search for a UPC code in a Database?
- When should I use CROSS APPLY over INNER JOIN?
- Count(*) vs Count(1) – SQL Server
- Best way to test if a row exists in a MySQL table
- MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET
- What’s the best way to dedupe a table?
- WP Optimization: Removing Orphaned wp_options (especially the autoload ones)
- This SQL request call all time and overload my server : SELECT meta_value FROM wp_sitemeta WHERE meta_key = ‘wp_installer_network’ AND site_id = 1
- What is a stored procedure?
- SQL Inner-join with 3 tables?
- Conversion failed when converting date and/or time from character string while inserting datetime
- MySQL create table if not exists and insert record only if table was created
- error, string or binary data would be truncated when trying to insert
- ORA-00907: missing right parenthesis
- Rename column SQL Server 2008
- Why do we need “Relationships” between tables at all?
- Using group by on multiple columns
- How to declare a variable in MySQL?
- ORA-01843 not a valid month- Comparing Dates
- How do I escape a single quote in SQL Server?
- Teradata: how to convert varchar value (format ‘dd.mm.yyyy’) to date (format ‘yyyy-mm-dd’ )?
- How Stuff and ‘For Xml Path’ work in SQL Server?
- How can I return pivot table output in MySQL?
- The multi-part identifier could not be bound
- MySQL syntax for Join Update
- Simple way to calculate median with MySQL
- The ALTER TABLE statement conflicted with the FOREIGN KEY constraint
- Error 1046 No database Selected, how to resolve?
- What is it exactly a BLOB in a DBMS context
- How do I do multiple CASE WHEN conditions using SQL Server 2008?
- Insert text with single quotes in PostgreSQL
- SQL Server IF NOT EXISTS Usage?
- How to insert date values into table
- Arithmetic overflow error converting numeric to data type numeric
- I want to use CASE statement to update some records in sql server 2005
- how to remove time from datetime
- TSQL PIVOT MULTIPLE COLUMNS
- MySQL – UPDATE multiple rows with different values in one query
- How to create a MySQL hierarchical recursive query?
- Microsoft OLE DB Provider for SQL Server error ‘80004005’
- Query to convert from datetime to date mysql
- How to query MongoDB with “like”
- MySQL equivalent of DECODE function in Oracle
- what is the difference between triggers, assertions and checks (in database)
- Replacing NULL with 0 in a SQL server query
- How to delete from multiple tables in MySQL?
- How to copy a row and insert in same table with a autoincrement field in MySQL?
- Backup a single table with its data from a database in sql server 2008
- Error converting data type varchar
- updating table rows in postgres using subquery
- I want to use CASE statement to update some records in sql server 2005
- Cannot create an instance of OLE DB provider Microsoft.Jet.OLEDB.4.0 for linked server null
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- ROW_NUMBER() in MySQ
- Foreign key references invalid table
- Is there a coalesce-like function in Excel?
- What are database constraints?
- Postgresql column reference “id” is ambiguous
- Inner Joining three tables
- How do I view the Explain Plan in Oracle Sql developer?
- ORA-01779: cannot modify a column which maps to a non key-preserved table
- SUM OVER PARTITION BY
- MySQL LIKE IN()?
- Filter data based on date in sql
- Varchar invalid for Sum operator
- SQL: How to properly check if a record exists
- ora-06553 pls-306 wrong number or types of arguments in call to ‘ogc_x’
- Sorting search results by taxonomy terms
- SQL select of users by metadata
- How to properly sanitize strings without $wpdb->prepare?
- How to remove in the wordpress database all posts revisions except the last three?
- $wpdb get_var issue
- posts_where Fails with More than One Custom Field in Query
- how to find and correct plugin query performance issues
- Inserting rows into a custom table, when plugin is activated
- dbDelta not creating table (yes, once more)
- Export SQL query based on post type
- Convert a category of posts to a custom post type using (MySQL) queries
- Connect to Ms SQL Server
- Clean up very big and very dirty database
- What is the point of get_comment_count() if you cannot limit by a comment type?
- wpdb prepare sql problem
- How can I convert everything from category X to have post format Link
- Can Anyone provide an example of RAW SQL for SELECTING posts by 2 or more tags
- REGEXP_REPLACE in post_contet
- Menu Order updating automatically
- How delete post_content records of specific category from phpmyadmin
- Reset post IDs with all post meta
- Fastest way to display 5000 post titles?
- How to Add or Change Post Title
- Why does DROP TABLE-ing the `wp_options` reset my user session?
- How do I display SQL query on a specific page of my wordpress site
- query sql-table and change entities
- Is it possible to utilize custom SQL for a single-post.php?
- How to handle my row actions on a custom list table in the admin section
- Backtick (MySQL norm) added to SQL Server Query causing error
- WordPress slow even use blank template
- How can I avoid duplicate primary keys in SQL import?
- Debug Performance Issues
- admin.php taking 14 seconds