Viewing 15 posts - 31 through 45 (of 441 total)
From your requirements, here's the SQL:
SELECT A.Col1 ,
b.Col1 ,
C.Col1
FROM A
...
May 20, 2010 at 2:08 pm
If it's splitting the string you need to do, then you can use this piece of code, to split it, and add it to your where statement dynamically.
DECLARE @MfrCodes VARCHAR(8000)
SELECT...
May 20, 2010 at 9:19 am
If I were you, I would check the home page of SQL Server Central, there is a headlight talking about how to get good performance, and good protection when using...
May 20, 2010 at 8:07 am
Grant Fritchey (5/18/2010)
ARE YOU CRAZY?!?!? UPDATING STATISTICS WITH FULL SCAN...
Actually, that's not a bad idea, at all. As you noticed, estimates & actuals are more than a bit off. The...
May 18, 2010 at 1:54 pm
So now, we know that adding columns to the column list, the Optimizer chose a whole different approach to seek the Events table, can you update the stats on this...
May 18, 2010 at 1:39 pm
So sorry, I copy pasted the same query twice in SSMS, it is my error, you are right, on the first query, the columns are in the select list. Sorry...
May 18, 2010 at 1:36 pm
Are the columns SchID and EVId? Because for those plans, they were both commented out when you ran the query. Can we have the plans when those columns are not...
May 18, 2010 at 1:30 pm
Are those queries on the same server? If no, then I'm guessing 1 of the server needs to have its statistics updated. You can see 1 of the plan seeks...
May 18, 2010 at 1:23 pm
Can you post the plans? Saved as .SQLPlan and Zipped together, we might be able to see something. Maybe you get a covering index for the first query.
May 18, 2010 at 1:07 pm
Stefan_G (5/17/2010)
May 17, 2010 at 6:24 am
Lookup "Convert" in Books online, you have plenty formats to use for a date.
May 12, 2010 at 8:50 am
cfradenburg (5/11/2010)
May 12, 2010 at 6:36 am
Sure, here's the full SQL. Thanks for taking a look at it.
DECLARE @CompanyID VARCHAR(4) ,
@DivisionID VARCHAR(4) ,
@DepartmentID VARCHAR(4) ,
...
May 11, 2010 at 11:24 am
I'm stumped that it needs to scan the whole GICSPFProductToZone table, where a seek could lower the reads drastically, and probably decrease the time of the execution by a fair...
May 11, 2010 at 8:49 am
Viewing 15 posts - 31 through 45 (of 441 total)