Hey all,
I've been called to a client's site that is installing a "database independent" solution. Of course, that means more work for my client. They are running into tons of performance issues and asked me to fix them. Unfortunately, most of the issues are caused by this "database independence" as the app is making a lot of select * calls, loading the return set locally, then crunching the data as they see fit. I've been asked to modify SQL only and not the application which makes the calls.
One issue is the app sends THOUSANDS of count(*) calls. No kidding, a simple lookup of one customer generates 17 count(*) calls. I guess the app is attempting to some sort of check.
Long story short (too late), does anyone know how to optimize a query such as 'select count(*) from custprice'?
-If it ain't broke, break it and make it better.
I've been called to a client's site that is installing a "database independent" solution. Of course, that means more work for my client. They are running into tons of performance issues and asked me to fix them. Unfortunately, most of the issues are caused by this "database independence" as the app is making a lot of select * calls, loading the return set locally, then crunching the data as they see fit. I've been asked to modify SQL only and not the application which makes the calls.
One issue is the app sends THOUSANDS of count(*) calls. No kidding, a simple lookup of one customer generates 17 count(*) calls. I guess the app is attempting to some sort of check.
Long story short (too late), does anyone know how to optimize a query such as 'select count(*) from custprice'?
-If it ain't broke, break it and make it better.