Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 SQL Query running slow

Author  Topic 

Frozen_123
Starting Member

33 Posts

Posted - 2008-08-21 : 15:49:58
Hi All,

I have two servers following are the description:

X1 -- Development server
X2 -- Test Server

Both server is using same linked server with same configuration. Test server is having 16 processors and 8 gigs of Ram and Dev server is having 8 Processors and 4 gigs of ram.

Today I am executed select statement from dev server and it took around 13 sec to fetch the results but when I tried to execute same select statement from Test server which is having far good configuration than dev it took around 30 min to fetch the records.

I don't know what is happining.

Urgent help would be appriciable.

Thanks in advance.

Frozen

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-08-21 : 15:57:17
Post the query for better help. Also what exactly difference do you see in Execution plan? I mean cost.
Go to Top of Page

Frozen_123
Starting Member

33 Posts

Posted - 2008-08-21 : 16:04:52
Please find query below:

Select HistDate,
TicketNum,
Flags,
OtherValue,
ReadSeqNum
FROM
ANTARES.ANT312.dbo.ORDERS_FLAGS_HIST
Where
[Flags] IN ('BrokerYield', 'OAS', 'Eff Duration')


Query cost was 100% on both servers.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-21 : 16:14:46
Query cost will always be 100% if you are only running one query in the batch.

What is the data type of Flags? What indexes do you have on this table?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -