Forum Replies Created

Viewing 15 posts - 10,231 through 10,245 (of 49,552 total)

  • RE: Adding 2 COUNT statements results in heavy query

    Why count(ID), not count(*)?

    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: CheckDB on Read_only database sometimes reports issues ??

    Was asking about the specific error that CheckDB found. It says "found 1 errors and repaired 0 errors.", what was that one error?

    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: If Statement

    crazy_new (1/28/2014)


    Not to sure. There are more than 1 records but there are not duplicates.

    Its just that there can be multiple entries for each address.

    Ok, so when an address is...

    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: Locking error while populating a table

    What's the query you're running?

    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: If Statement

    crazy_new (1/28/2014)


    When I do it before then I get the following error.

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= ,...

    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: If Statement

    crazy_new (1/28/2014)


    Just below that I set the value.

    SET @ADR3 = (SELECT ADR3

    FROM PAT_NAMES_ADDRESS

    WHERE ADR1 = @ADDRESS)

    SET @ADDRESS = 'M & B Pumps Division'

    So search for all rows matching 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: CheckDB on Read_only database sometimes reports issues ??

    What was the actual error that CheckDB found?

    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: If Statement

    Where are you setting the value of @ADDRESS?

    In your code, you have:

    DECLARE @ADR3 VARCHAR(100), @ADDRESS VARCHAR(100)

    SET @ADR3 = (SELECT ADR3

    FROM PAT_NAMES_ADDRESS

    WHERE ADR1 = @ADDRESS)

    So you're declaring @ADDRESS then using it...

    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: Query just hangs!

    Abu Dina (1/28/2014)


    David Webb-CDS (1/27/2014)


    I'm afraid you're asking for code that would make these two:

    21ST CENTURY SERIVES

    21ST CENTURY SERVICES

    equal, not because they are, but because they SHOULD be. Is...

    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 Server 2012 Memory Usage

    If you leave max server memory at default, you're telling SQL it can use every scrap of memory on the machine. If that's not what you want (and it usually...

    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: SQLServer 2012 always on cache plan cleared quickly

    Not following, could you explain more what the problem is?

    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: In a Trace, is CPU = elapsed Time?

    CPU is the amount of time the query spends actually executing on the CPU(s). Duration is the elapsed time (or datediff start time and end time), this includes time 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: CheckDB on Read_only database sometimes reports issues ??

    Misbehaving IO subsystems aren't going to honour a read-only flag on a database. Corruption is typically IO subsystem (much rarer memory) related.

    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: Are the posted questions getting worse?

    Sometimes I wonder if people really want help.

    "Sample data please"

    "I don't see the point" "It won't be of any benefit"

    "Expected results please"

    "It's not going to help"

    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: Query just hangs!

    Abu Dina (1/27/2014)


    It's really about finding duplicate entries within the record set. A duplicate in this case is at site/business level.

    Same company same address = duplicate

    No company but with same...

    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 - 10,231 through 10,245 (of 49,552 total)