SET EXPLAIN
Posted in 1994
Question: I am trying to figure out the total cost of select below. 1) Is it the estimated cost of 6 2) or is it the estimated cost of 6 + subquery cost of 3 ????? QUERY: ------ SELECT miscdata_1[1] FROM lu_lookd_128 WHERE lu_id = (SELECT lu_id FROM lu_lookm_127 WHERE lu_lookm_127.cnt_nbr = "TRINTOC" AND lu_lookm_127.labname = "rp_type") AND lu_lookd_128.cde = "POSPD" Estimated Cost: 6 Estimated # of Rows Returned: 1 1) dbadmin.lu_lookd_128: INDEX PATH (1) Index Keys: lu_id cde Lower Index Filter: (dbadmin.lu_lookd_128.lu_id = <subquery> AND dbadmin.lu_lookd_128.cde = 'POSPD' ) Subquery: --------- Estimated Cost: 3 Estimated # of Rows Returned: 2 1) dbadmin.lu_lookm_127: INDEX PATH (1) Index Keys: cnt_nbr labname Lower Index Filter: (dbadmin.lu_lookm_127.cnt_nbr = 'TRINTOC' AND dbadmin.lu_lookm_127.labname = 'rp_type' ) trr -- Ted Reph @ UE&C - Catalytic in Philadelphia, PA INTERNET: trr@trac3000.ueci.com