When the debug options are enabled queries are logged to a table including various details. You can use the “DBAL debug” backend module to view the log:
Above the table you see a few items to click on:
FLUSH LOG clears the logging table.
JOINS shows you the logged table joins, if that feature has been enabled.
ERRORS shows just the entries that caused an error.
PARSING shows the results of the SQL parsing check, if that feature has been enabled.
LOG is what you see when you enter the module.
WHERE shows a log of all WHERE-clauses. This may be used to optimize the database structure or spot performance bottlenecks.
The main log table shows you when how many queries where executed from what script in how much time. If an error occurred, this is noted as well. If you click on the script name, you'll get a list of all queries to help you with debugging.
To aid in debugging problems with null value comparisons '', IS NULL and IS NOT NULL are highlighted in the log and where views in red and green respectively. This indicates no error in itself, so don't worry too much about it.
The DBAL extension makes heavy use of caching for field information. This includes primary keys, auto_increment fields and native/meta types of fields.
To see the cached data select View cached data in the DBAL Debug backend module. From there you can clear the cache file, if that seems necessary (it is automatically cleaned whenever the database structure is changed from within TYPO3).
The configuration as it has been defined in localconf.php can be checked in the backend by using the Configuration module in the Tools section. Select $TYPO3_CONF_VARS and open the EXTCONF/dbal part of the tree display.
Here you can check SQL queries for compliance with the TYPO3 SQL parser. If you enter values in the form fields those are handed to the query building methods and the result is shown. Check of it matches your input to see if the DB subsystem (core and DBAL) can do what you want. For testing inserts, a very simple syntax is used to specify the values to be inserted in the first textarea: Each line is seen as a key/value pair that is exploded at =.
The raw SQL check allows you to enter any query you like and have it parsed and reassembled by TYPO3. If this is successful the input will be shown below. In case of an error (input and output not matching) the query generated by TYPO3 is shown in a red box below the input query.