我维护的系统似乎每隔几天就会变慢一点,我认为它来自某个地方的错误查询。
据我所知,我已将问题缩小到一两页。这是我认为导致问题的页面上的查询。
select a.s_purchase_order as order_id, a.order_type, a.nobackorder, a.order_note, a.note, a.rqst_dlvry_date, b.customer_name ,c.store_name,(c.store_name + ',' + isnull(c.address1 + ',', ' ') + isnull(c.city + ',', ' ') + isnull(c.state_cd+ ',', ' ') + isnull( c.zipcode, ' ')) as store_info, d.supplier_account
from VW_CustomerOrder a, Customer b, Store c, eligible_supplier d
where a.customer = c.customer
and a.store = c.store
and a.customer = b.customer
and c.customer *= d.customer
and c.store *= d.store
and a.supplier *= d.supplier
and a.purchase_order = @order_id
and a.customer = @customer_id
and a.store=@store_id
and a.supplier = @supplier_id
是否有明显的东西会非常慢或导致系统随着时间的推移而变慢?