See all SQL
If you want to see all the SQL that's being issued you need to set a DBI Trace.
You can either set the DBI_TRACE environment variable
...or log to a file using DBI::ProfileDumper and dbiprof for analysis...
DBI_PROFILE=DBI::ProfileDumper ./myscript.pl dbiprof
...or log to a file using the DBI_TRACE environment variable...
...or by adding the following...
DBI->trace(2 => "/tmp/logfile");
Another method is to enable logging capabilities of your DBMS. For example in MySQL add '--log' option to command line when starting server.