Viewing 15 posts - 48,376 through 48,390 (of 49,552 total)
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
October 15, 2007 at 12:38 am
Maxer (10/12/2007)
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
October 12, 2007 at 9:33 am
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
October 12, 2007 at 9:15 am
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
October 12, 2007 at 7:46 am
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
October 12, 2007 at 7:37 am
rerichards (10/11/2007)
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
October 12, 2007 at 1:47 am
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
October 11, 2007 at 1:06 am
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
October 10, 2007 at 2:24 am
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
October 10, 2007 at 2:09 am
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
October 10, 2007 at 12:34 am
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
October 8, 2007 at 12:22 am
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
October 5, 2007 at 7:47 am
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
October 5, 2007 at 7:37 am
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
October 5, 2007 at 1:06 am
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
October 4, 2007 at 8:02 am
Viewing 15 posts - 48,376 through 48,390 (of 49,552 total)