I have the following SQL query which I need to optimize. Currently the execution time for this query is around 2 mins.
select top 1 o.ordernumber
from orders o with (Nolock)
inner join customer cu on cu.customerid=o.customerid
inner join orders_shoppingcart os1 on o.ordernumber=os1.ordernumber
inner join product p1 on p1.productid=os1.productid
and (p1.producttypeid = 1 or p1.producttypeid=7)
and (p1.name != 'General Fund'or p1.name != 'Corpus Fund')
--and o.transaction_source not like '%dedo'
order by o.createdon desc
Any help in this regard would be greatly appreciated,
Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes. We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.