posted 12 years ago
both querys returns the same result set....
all i want to know is ..... which one is effecient when there is volume of the data exceds 1 lac
select
lo.loc_name,
d.dispense_date,
p.patient_id,
p.patient_last_name,
a.prod_name,
s.lot,
s.expiry_date,
d.physician,
d.notes
from
lp_manage_patient as p,
rfx_ent_products as a,
lp_dispense as d,
lp_serial as s,
rfx_ent_locations as lo
where
d.manage_patient_id = p.manage_patient_id
and
d.product_id = a.prod_id
and
d.serial_id = s.serial_number
and
lo.location_id=p.location_id;
----------------------------------------------------------------------
select
lo.loc_name,
d.dispense_date,
p.patient_id,
p.patient_last_name,
a.prod_name,
s.lot,
s.expiry_date,
d.physician,
d.notes
from lp_manage_patient as p
inner join lp_dispense as d on d.manage_patient_id = p.manage_patient_id
inner join rfx_ent_products as a on d.product_id = a.prod_id
inner join lp_serial as s on d.serial_id = s.serial_number
inner join rfx_ent_locations as lo on lo.location_id=p.location_id;