Fun with array fetch

I’ve lost track of the number of times I’ve worked with systems that didn’t run brilliantly because every database operation was the “row at a time” methodology.  Typically you see hundreds of routines (either in the database in PL/SQL) or further up the chain in C#, Java etc, and the “alarm bells” start ringing in my head when all of those routines are prefixed with “GET_” and the input parameter looks like a primary key.

It doesn’t take long before the code-reuse mindset starts creating things like:

“for each  EMPLOYEE on screen, call GET_EMP_DETAILS(:screen.employee_number)”

So to try demonstrate the silliness of this… I ask the question:

Would you do this in real life ?

And here’s what happens if you do


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s