Viewing 15 posts - 76 through 90 (of 1,346 total)
>>Does SQL evaluate both parts of an OR condition or does it stop when one condition is TRUE? For example:
No guarantees what it will do. SQL uses a cost based...
November 30, 2007 at 11:20 am
I have seen cases where adding the (WITH FASTFIRSTROW) hint can change the query plan and improve the overall performance.
However, usual disclaimers apply - use hints like this as a...
November 30, 2007 at 8:27 am
That's all the indexes ? Just a clustered primary key on the P_K column and no non-clustered indexes ?
It seems that you are joining frequently on columns like N_K_HTXTITL_HTXLINC, so...
November 29, 2007 at 3:28 pm
I don't see anything obvious that explains the diff between SQL2K and SQL2K5. However, I do see some less than optimal code that could be fixed in both versions:
Select DHT_TITLE_REFRNC_NBR...
November 29, 2007 at 1:10 pm
Can we see the view definitions ?
Are the views doing anything that isn't supported under SQL2K5 ? Eg: the use of SELECT TOP 100 PERCENT in a view in...
November 29, 2007 at 12:59 pm
Try placing a SET NOCOUNT ON at the start of the proc to eliminate the row count status messages. Sometimes confuses client side components.
Also, do you need the temp...
November 29, 2007 at 9:12 am
>>On the db server side, I've done the execution plan for the queries that time out, and there's nothing resource-intensive going on (no table scans, etc).
Right, but you've done...
November 28, 2007 at 8:23 am
SQL is parsed. Then it is executed. The parser is generating the error, and that is happening before the IF statement has executed. The parser simply sees 2 attempts to...
November 26, 2007 at 3:51 pm
>>However, the application which calls those procedures need both of them explicitly.
By that, are you inferring that you have no control over the application code, and therefore can't make any...
November 26, 2007 at 12:32 pm
What you have here is a ranking problem, with 2 levels of ranking.
If dt is NULL and there's a fee, that ranks first, otherwise you apply a secondary ranking based...
November 26, 2007 at 9:02 am
>>Your approach to solving this solution is suboptimal.
So, for every query in your system where there is a join to a small "lookup" table, you'd replace the join with a...
November 23, 2007 at 10:21 am
To add to that ...
I count at least 10 occurrences of
SOME_KEY IN (SELECT * FROM #TBLTEMP12)
Can you convert those IN () sub-queries to EXISTS () or INNER JOINs ?
Also,...
November 22, 2007 at 9:03 am
In general:
SELECT
t1.colx,
(SELECT t2.coly FROM table2 t2 WHERE t2.id = t1.id) AS coly
FROM table1 t1
WHERE t1.some_col = 'something'
.. this will be slower. Also, depending on cardinality it does not produce...
November 21, 2007 at 1:48 pm
Ahh, if it's Crystal passing the parameters, maybe the parameter declarations need to be changed:
CREATE PROCEDURE dbo.gm_P4P_PQRI_MEARSURE_8
(
@STARTDATE VARCHAR(20) = NULL,
@ENDDATE VARCHAR(20) = NULL,
Declare params as varchars, let Crystal pass in...
November 15, 2007 at 8:41 am
>>IF ISDATE(@StartDate)=1 AND ISDATE(@EndDate)=1
The variables @StartDate and @EndDate are already true datetime datatypes, so this IF statement is redundant.
>>AND MWAPPTS.ADATE BETWEEN CAST(Convert(varchar(100), @StartDate, 101) as DateTime) AND CAST(Convert(varchar(100), @EndDate, 101)...
November 15, 2007 at 8:30 am
Viewing 15 posts - 76 through 90 (of 1,346 total)