Category: Oracle

Child records where no parent exists?

This is a great interview question: How can there be child records where no parent exists? This is actually a trick question. There can exist child *records*, but no *values* for the column that references a non-existent parent. In other…

Oracle materialized view and query rewrite

Just a simple example to show what it takes to get this to work… SQL> set lines 1000 trims on pages 100 SQL> explain plan for select count(*) from member; Explained. SQL> select * from table(dbms_xplan.display()); PLAN_TABLE_OUTPUT ——————————————————————————– Plan hash…