469,271 Members | 1,702 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

SQL Server Query Optomizer

dbcc freeproccache
dbcc dropcleanbuffers

Select poi.POD_ID
From POD_ITEM poi
Join POD p On p.POD_ID = poi.POD_ID
Join #CUSTOMER c On p.CUSTOMER_ID = c.CUSTOMER_ID

-- No of rows in #CUSTOMER = 51
-- No of rows in POD_ITEM = 3.8 million
-- No of rows in POD = 1.4 million

-- 98% Cost is with POD_ITEM.PK_POD_ITEM - clustered, unique, primary
key located on PRIMARY - index_keys - POD_ID, POD_ITEM_NO

-- Indexes fully rebuilt, fill factor 90%
-- Takes 10 seconds to return 15,780 rows

This cannot be right? Surely this should be subsecond or close to it?

Brian
Jul 23 '05 #1
0 891

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Alexander Bosch | last post: by
11 posts views Thread by Bob | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.