Forum Replies Created

Viewing 15 posts - 48,376 through 48,390 (of 49,552 total)

  • RE: Returning rows in one table based on rows not in another table

    Without a table schema and sample data I can't give you exact code. You're probably looking for something like this.

    This will get you all the records in A that...

    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 Query tuning

    Maxer (10/12/2007)


    Examples:

    1. CustomerID = y

    2. OrderID !=x and customerID = y

    3. OrderID > x and customerID = y

    Example 1 will not use the index because it references OrderID first, 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: SQL Query tuning

    TheSQLGuru (10/12/2007)


    One thing to add for this is that since you are on SQL 2005, consider making Amount an INCLUDE column instead of part of the actual index list of...

    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 Query tuning

    Maxer (10/12/2007)


    I've also heard that if you create an index on (for example): OrderID, CustomerID (say in tblCustomerOrders) that if you query that table you need to make sure...

    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 Query tuning

    In my experience it has the most impact when the aggregated columns are also in the index.

    Consider a simple table

    CREATE TABLE Payments (

    PaymentKey INT IDENTITY PRIMARY KEY,

    CustomerID int,

    InvoiceID int,

    PaymentDate...

    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: Lock Pages in Memory vs. same Min/Max Server Memory value

    rerichards (10/11/2007)


    Thanks Gila. That confirms my first question, when having the ability to Lock Pages in Memory in 64 bit EE, essentially that the OS cannot trim SQL Servers working...

    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: Lock Pages in Memory vs. same Min/Max Server Memory value

    Lock pages prevents the OS from swapping SQL out of memory if there's memory pressure on the box.

    When the OS gets short of memory, it will ask all processes, including...

    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: database performain slow

    Anton, see the PM I sent you.

    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: Insert Problem

    Order of columns doesn't really have a meaning in SQL. If you name columns in select/insert (which you should) the order that the columns are speified in the metadata 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: Help Please

    All simple recovery mode does is to automatically truncate the transaction log on a checkpoint. The deletes will still be logged.

    If you have any NC indexes, drop them. If you...

    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: Odd SQL issue - locked up server

    I haven't seen orphened transactions on this particular server. One of our other servers gets them often (usually from jdbc connections)

    I chatted with a SQL engineer and he suggested that...

    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: Sent PMs are not in the Sent folder

    There's a checkbox underneath the PM text box, to save a copy into sent items. It is unchecked by default.

    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 2000 - Excessive Paging

    See what the following counters look like:

    under physical disk

    Transfers/sec (for each of your drives seperatly)

    under process (for SQL at least. Other processes if you think they may be contributing to...

    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: Odd SQL issue - locked up server

    No reoccurence last night. This is probably going to be one of those once-off mysteries that never get solved. Did get a nice perfmon trace over the entire night that...

    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 2005 Locking up

    From management studio? I believe that error comes from the object explorer.

    Try SQLCMD (the command line tool) or using management studio, don't connect the object explorer, create a new...

    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 - 48,376 through 48,390 (of 49,552 total)