Viewing 15 posts - 1 through 15 (of 111 total)
All,
Found out (thanks to Joe) it can be solved using CTE expression for both IN and OUT status and performing date diff.
Vidhya
September 6, 2012 at 3:46 am
Hey,
Can this also be affected by sever collation? Live server is SQL1_Latin but my test is Latin1_General.
Thanks,
Vids
January 19, 2012 at 8:22 am
Paul,
Creating a report with aggregation for database less than 10,000 of rows can be achieved using T-SQL queries. Consider if you want to analyse the database having millions of rows...
April 7, 2011 at 5:42 am
Grant,
Yes, the plan is taken after introducing the new indexes on order table. Im waiting for the site maintenance schedule to update the indexes and statistics. Hopefully after that I...
December 11, 2009 at 7:30 am
Grant,
Actual estimated plan attached. (Wake up call to update my skills)
Ta
December 11, 2009 at 5:56 am
Lowell,Grant,Barry,
I now have clustered index on order_Id and non-clustered index on date_entered,shipping,friendly_order_id,shopper_ID. With introduction of date_entered I have gained 5 mins in exectuion. It is execting much faster....
ta
December 11, 2009 at 4:30 am
Lowell (12/10/2009)
i'm thinking that an index on date_entered DESC at a minimum is needed, and i would try an index on date_entered ,friendly_order_id,order_id,shopper_id,shipping first.
I have now created a non-cluster index...
December 11, 2009 at 4:22 am
Hi Grant,
Neither Ctrl + M or clicking Include Actual Execution plan is not bringing the execution plan.
Not suer why this is happening.
Ta
December 11, 2009 at 3:26 am
Lowell,
I have replaced the script to
INSERT INTO #Processing (order_ID,date_entered,invoice_number)
select distinct top 10 r.order_ID,r.date_entered,r.invoice_number from receipt r
join receipt_item ri on
r.order_ID = ri.order_ID
where ri.batch_ID is not null...
December 11, 2009 at 3:08 am
Yes , Im running on the same server/instance and same disk. We dont have raid disks even in Live server 🙁 .
Ta
December 10, 2009 at 2:00 pm
i'm thinking that an index on date_entered DESC at a minimum is needed, and i would try an index on date_entered ,friendly_order_id,order_id,shopper_id,shipping first.
Currently index exists only on order_ID field. No...
December 10, 2009 at 1:57 pm
Lowell,Grant,Barry,
As lowell suggested I executed stored procedure as following and attaching new execution plan.
set ansi_nulls on
go
SET QUOTED_IDENTIFIER ON
go
exec getorders 1,10,0,0,''
go
December 10, 2009 at 9:37 am
Hi Barry,
For clarity I have posted the exact code of stored procedure and adhoc query below
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
alter PROCEDURE [dbo].[GetOrders](@PageIndex int, @PageSize int, @CountOnly bit ,@TotalRows int...
December 10, 2009 at 9:23 am
Barry,
I have just named the temp tables differently. I have now include the execution plan for both adhoc and stored procedure, please take a look when you next visit...
December 10, 2009 at 9:02 am
Viewing 15 posts - 1 through 15 (of 111 total)