[storm] Display executed SQL?

Lutz Horn lutz.horn at fastmail.fm
Fri Mar 7 16:05:06 GMT 2008


Hi,

On Fri, 7 Mar 2008 15:47:47 +0100, "Morten Siebuhr" <sbhr at sbhr.dk> said:
> Lutz Horn skrev:
> > is it possible to let Strom display or log the SQL it executes? I'd like
> > to see the SQL to be able to improve the indexes on my tables.
> 
> A tip I got from Håvard:
> 
> import storm.database
> storm.database.DEBUG = True
> 
> AFAK, it prints the executed SQL.

Yes, this prints the unexpanded SQL along with the parameters to
sys.stdout. Is it possible to print it to a different file like object
than sys.stdout? This and perhaps printing the SQL with expanded
parameters would be very useful.

Thanks
Lutz 










More information about the storm mailing list