Beginner's SQL: Loop The Output Support

In this second article in the new Beginner's SQL series, a common performance problem is solved. When a database-driven Web page runs a query to retrieve some data, and then uses a value from each row in the result to run an additional query, this "query in a loop" requires excessive and unnecessary database overhead. More importantly, the total time to complete the database retrievals, and thus the resulting Web page download time, balloons. In this article, four examples are shown which "loop the output" and not the query: simple lists, header/detail listings, row differences, and subtotals.
$2.89
- OR -

Rudy Limeback

Rudy LimebackRudy Limeback is an independent consultant with over 20 years of SQL experience using DB2, SQL Server, Access, Oracle, and MySQL. Rudy is also a Web developer, Technical Editor at Digital Web, one of the original evolt.org admins, with his own Web site since 1996. More information at r937.com. Rudy lives in Toronto, Canada, where the weather allows you to play frisbee golf all year long.

See All Postings From Rudy Limeback >>