• Lovely example of a coding `performance issue` we found just before christmas...

    A collegue here overseas a system with a process they were running that was incredibly slow. (External product we have). Actually, one of a few processes that run slowly with that system 😉

    So I showed him the wonder that is `sql server profiler` 🙂 (Which some of our dba's here seem to know little about!)

    Spotted a strange pattern in the code being run. 400 instances of count(*) being called when we ran a single record of the process in question, running about 15ms per count(*). In a live situation, this may happen over increasing number of records. Only 100 records? 10 minutes of count(*)'s 🙂

    So we investigate more, and this same code was running all over the place.

    We contacted the suppliers and talked to a developer.

    ....Yes we use count(*) so our system can check if a table exists with a particular copy of our software or not

    Im sure you can think of your own series of polite questions you might ask a supplier regarding the above, suffice to say at this point we had some words with them, and await their next update with great interest 🙂

    Makes me think what other wonderments of code they have hidden away in their system!

    🙂

    martin