Viewing 6 posts - 61 through 66 (of 66 total)
Grant Fritchey (3/18/2009)
While the query can be tuned, it sounds like you might be hitting blocking, not so much a direct query performance problem.
I wondered about that but wouldn't...
March 18, 2009 at 7:50 am
The annoying thing is that at the time of posting on this forum the query runs in less than a second, it's only at certain periods throughout the day when...
March 18, 2009 at 7:26 am
Grant Fritchey (3/18/2009)
March 18, 2009 at 6:36 am
HI
I've attached the execution plan
March 18, 2009 at 5:18 am
Sure, here's the query:-
WITH myMessages AS (
SELECT msg.id, msg.m_username, msg.c_name, msg.m_Created, msg.m_subject, msg.c_msg, msg.m_read, msg.m_dateRead, msg.m_replied, msg.m_dateReplied, msg.m_forward, msg.importance
,ROW_NUMBER() OVER (ORDER BY msg.m_read asc,
case
when @order=1 then...
March 18, 2009 at 4:38 am
Okay here goes, this is the table structure and the indexes
-- Table Structure
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[msg](
[id] [int] IDENTITY(1,1) NOT NULL,
[c_name] [nvarchar](100) NULL,
[c_mail] [nvarchar](150) NULL,
[c_company] [nvarchar](150)...
March 18, 2009 at 4:26 am
Viewing 6 posts - 61 through 66 (of 66 total)