Oracle Magazine, March/April 2019
Database Developer and DBA ETL ORACLE MAGAZINE MARCH APRIL 2019 109 3 DEPT d 4 where e DEPTNO d DEPTNO A common coding mistake happens when each table in the SQL query has its own set of predicates Because developers assume that all of the required filtering is handled by these predicates the crucial join condition is forgotten as in the example in Listing 8 Listing 8 Missing join predicate due to presence of other clauses SQL select d DNAME max e SAL 2 from EMP e 3 DEPT d 4 where e JOB SALESMAN 5 and d LOC NORTH 6 group by d DNAME As already mentioned aggregations can mask the incorrectness of the SQL statement It is only when the execution plan is examined that a Cartesian join which can be a predictor of a future performance problem for large volumes of data is detected see Listing 9 Listing 9 Missing join predicate leading to Cartesian cross product Id Operation Name 0 SELECT STATEMENT
You must have JavaScript enabled to view digital editions.