Tuesday, May 23, 2006

We've all engaged in code generation of one sort or another. For certain problems it's just the right, or perhaps the only tool. But then your content management vendor starts to throw this sort of thing at your database...

How ignorant of them! When they could have converted the complete IN-list to an OR-list and avoided any limits... except the shared pool size and therefore the number of users they could support, of course :-)I have actually seen this "smarter" approach in a VB application using DAO (or similar microsoftism) some years ago. The VB developer claimed that DAO generated the code...I often see a more advanced approach that at least uses bind variables instead of literals:...where (id=:a1 or id=:a2 or...)