This is probably an age-old question, but I need to know the answer for something I am working on. The performance of a very large stored procedure has come into question and I am analyzing everything.
(Ordinarilly I could run the two queries myself but the real ones are embedded in the stored procedure and are based on temp tables)
Which of the following would be more efficient.
This way:
select [a.columns], [b.columns], [c.columns]
from customers a,
orders b,
payments c
where b.customer_id = a.customer_id
and c.order_id = b.order_id
order by a.customer_id, b.order_id, c.payment_date
or this:
select [a.columns], [b.columns], [c.columns]
from customers a
inner join orders b on b.customer_id = a.customer_id
inner join payments c on c.order_id = b.order_id
order by a.customer_id, b.order_id, c.payment_date
Thanks in advance,
Jerry Scannell
(Ordinarilly I could run the two queries myself but the real ones are embedded in the stored procedure and are based on temp tables)
Which of the following would be more efficient.
This way:
select [a.columns], [b.columns], [c.columns]
from customers a,
orders b,
payments c
where b.customer_id = a.customer_id
and c.order_id = b.order_id
order by a.customer_id, b.order_id, c.payment_date
or this:
select [a.columns], [b.columns], [c.columns]
from customers a
inner join orders b on b.customer_id = a.customer_id
inner join payments c on c.order_id = b.order_id
order by a.customer_id, b.order_id, c.payment_date
Thanks in advance,
Jerry Scannell