Lodewijks, Jeroen skrev: ...[snip]... > If so, I don't expect much performance improvement as I am only > optimising a few lines of Perl.
In my experience you always get the greatest performance improvements by changing your SQL instead of changing you Perl - often several orders of magnitude greater. Sometimes it takes database schema changes, but even that may be worth the trouble. You should: - reduce the number of round-trips to the database (as a rule of thumb the number of prepares, executes, fetches, commits and rollbacks - dependent on fetch-caching etc) - reduce the number of times the query optimizer has to be invoked (roughly either the number of prepares or the number of executes, dependent on the driver and DBMS) - reduce the amount of data transferred But of course you should *ALWAY* measure before you optimise, otherwise you'll be doing it blindly. Find out where your application is spending it's time - I'll be greatly surprised if it is in the DBI code or the Perl code surrounding it. -- Henrik Tougaard
