Archive for March, 2011

Which service is executing a given SQL statement

Saturday, March 26th, 2011

We have a shared PLSQL code base between several pieces of application services. Some of them use all of it, some only a few pieces. We also use database services for accounting reasons. I needed to determine which database service was executing a given SQL statement while we plan a migration that may impact... »

Posted in Database, Development, Oracle, Python | No Comments »

Why MERGE should be used for even single row inserts

Tuesday, March 1st, 2011

We recently had an issue where a particular insert was generating a large amount of CPU time requirements. When we examined the PL/SQL code, we found the developer had coded the following… 1 2 3 4 5 6 7 BEGIN INSERT INTO TABLE VALUES(pk); EXCEPTION WHEN DUP_VAL_ON_INDEX THEN NULL; END; / We found the... »

Posted in Database, Oracle | No Comments »