Solved

SQL 2005 Query Hangs and never returns results. If i update Stats it runs

Posted on 2006-07-20
3
575 Views
Last Modified: 2010-05-18
Heres the query


SELECT ve2.ID, ve3.VALUE_AS_STRING, ve5.VALUE_AS_TEXT, ve7.VALUE_AS_STRING, ve9.VALUE_AS_STRING,
ve11.VALUE_AS_STRING
FROM tblGRNT ve0 INNER JOIN tblGRNT2 ve1 ON ve1.GRANTEE_VEOID = ve0.VEOID
  INNER JOIN tblD)ve2 ON ve2.VEOID = ve1.DATAOBJECT_VEOID
  INNER JOIN tblDAve3 ON ve3.DATAOBJECT_VEOID = ve2.VEOID
  INNER JOIN tblMDAve4 ON ve4.VEOID = ve3.METAATTRIBUTE_VEOID
  INNER JOIN tblDAve5 ON ve5.DATAOBJECT_VEOID = ve2.VEOID
  INNER JOIN tblMDAve6 ON ve6.VEOID = ve5.METAATTRIBUTE_VEOID
  INNER JOIN tblDAve7 ON ve7.DATAOBJECT_VEOID = ve2.VEOID
  INNER JOIN tblMDAve8 ON ve8.VEOID = ve7.METAATTRIBUTE_VEOID
  INNER JOIN tblDAve9 ON ve9.DATAOBJECT_VEOID = ve2.VEOID
  INNER JOIN tblMDAve10 ON ve10.VEOID = ve9.METAATTRIBUTE_VEOID
  INNER JOIN tblDAve11 ON ve11.DATAOBJECT_VEOID = ve2.VEOID
  INNER JOIN tblMDAve12 ON ve12.VEOID = ve11.METAATTRIBUTE_VEOID
WHERE ve0.VEOID = 201 AND ve4.MET_NAME = 'ID' AND ve6.MET_NAME = 'PROJECT_TITLE'
  AND ve8.MET_NAME = 'AWARD_DATE' AND ve10.MET_NAME = 'GRANT_AMOUNT' AND ve12.MET_NAME = 'PAID_AMOUNT'
0
Comment
Question by:Mikal613
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 17147321
I hope you have all the indexes on the fields that are in the join conditions
0
 
LVL 48

Author Comment

by:Mikal613
ID: 17147329
how do i check that?

(Hey angel long time no speak)
0
 
LVL 48

Author Comment

by:Mikal613
ID: 17154425
You were right can you tell me why it had to be that way?
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
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.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question