in reply to How to view SQL statements

Maybe $sth->{Statement} is handy, which will give you the actual SQL that was prepared/executed.