Forum Replies Created

Viewing 15 posts - 47,776 through 47,790 (of 49,552 total)

  • RE: Using TOP Clauses within Exists Statement

    Sure. Thing is with the rownumber, you'll only be reading the table once. With exists, you're reading it at least twice.

    -- returns 10 rows for the second page of a...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Slow Query and High IO

    Could you post the definitions of the two tables and all the indexes on them please.

    All I can see from the exec plan is that you have two index scans....

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How do I delete excess transaction logs.

    Step 4: Rebuild all your indexes to undo the damage that ShrinkDatabase did to them

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: stored proc

    Turn traceflag 1204 on (DBCC TRACEON (1204)) then run your proc. You'll get a deadlock graph written to the error log that will tell you the two processes involved in...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Tune this...Large Estimated Row Size

    Could be IO related, could be insufficient memory, could be network speed. Could also be memory and display time on the client. It's about 70 MB of data you're tossing...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Index Tuning

    The order of expressions in the where clause doesn't make the slightest difference. SQL will do them inn whatever order is most efficient, based on the data and the available...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Date string in WHERE causes table scan instead of index seek

    Steve Ervolino (1/4/2008)


    Thanks for the input. Unfortunately, that didn't help either. Seems that manipulating the date at all is enough for SQL to ignore the index.

    Hmmm. Sometimes...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Finding Current Month's First Day& Last Day

    It's a pleasure, and thank you for the feedback.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: invalid entry in sysobject preventing constraint creation

    There is no way to update any of the system tables in SQL 2005.

    Try running a DBCC CheckDB on that database. I think checkDB checks the system catalogs, so...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL STATEMENT HELP

    With mine, the error is because you didn't create the function DateMonthStarts. It's not an inbuilt SQL function. The contents of the function can be found on the page I...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Data Integrity

    Have a look at the hash_bytes function. Might do what you want. There's also checksum and checksum_agg

    I'm not sure they're sufficient for what you're trying to do, but they might...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Create clustered or non-clustered index on large table ( SQL Server 7 )

    Use query analyser. While they run the same code, if the operation takes too long, enterprise manager may timeout and undo the operation. Query analyser doesn't timeout.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Date string in WHERE causes table scan instead of index seek

    It's not the concat that's the problem, it's the variable usage.

    If a query uses either parameters or hard coded values, the optimiser knows, at the point that it's compiling and...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: stored proc

    In that case, since you're not building up a string, you don't want the quotes. In the first case, you were building up a string to be executed, so the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Index Tuning

    If you have queries of the form

    WHERE EmpID = @Emp AND DeptID = @Dept, then only one of the indexes will be used. Which one depends on the selectivity...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 47,776 through 47,790 (of 49,552 total)