Viewing 15 posts - 4,156 through 4,170 (of 49,552 total)
Short answer, you've created a filtered index and tried to force SQL to use it to execute a query that does not have a predicate matching the index's filter predicte,...
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
November 30, 2015 at 1:48 pm
If you have a partitioned table, as in CREATE TABLE ... ON <PartitionScheme(Column)>, then the query as you've written will work. A partitioned table is one table, you query 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
November 30, 2015 at 1:45 pm
Those rules should be agreed with your team. There's no hard and fast rules there, I would indent differently to how Grant did in the queries above. Neither of us...
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
November 30, 2015 at 9:41 am
Table definitions, index definitions and execution plan (as a .sqlplan file) please.
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
November 30, 2015 at 9:32 am
Not a quick fix.
Your code has a race condition. Two sessions could execute this at the same time, both run the SELECT and find no rows, then both run 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
November 30, 2015 at 7:16 am
Rows are locked before being read. A row has to be read to see if it qualifies for a query predicate. If it does, then it's returned with no second...
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
November 30, 2015 at 7:03 am
Yes it will. Not 100% sure, but I think it'll check the statistics for the column involved in the predicate (as in, the column stats for it) and it multiplies...
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
November 30, 2015 at 5:08 am
To achieve what (other than additional complexity)?
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
November 30, 2015 at 2:19 am
Agreed, sounds like the customer table needs some normalisation. Though I don't see how 3000 attributes = 3000 rows, an attribute is a column, so 3000 columns. But yeah, 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
November 30, 2015 at 12:02 am
Correct, plan forcing can't change the query itself. The way plan forcing works is that the optimiser will optimise the query until it finds the plan being forced. If 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
November 29, 2015 at 11:58 pm
titsiros (11/29/2015)
But why is this a temporary solution, is there a problem with leaving it on external and keep it plugged in?
None, until it gets accidentally unplugged, dropped, borrowed for...
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
November 29, 2015 at 2:57 pm
You need to take this problem to your manager and discuss it with him and try to come up with a resolution which satisfies all parties. We can advise 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
November 29, 2015 at 2:11 pm
You can use the 'relocate all files' if there's enough space on the external for all the files. If there isn't, you'll have to edit the paths one by one.
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
November 29, 2015 at 1:12 pm
geodrone (11/29/2015)
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
November 29, 2015 at 1:09 pm
If everything underneath is a single pool of disks, then there's little point in creating different logical drives for different things. Maybe some space management, but not performance. Now, if...
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
November 29, 2015 at 1:07 pm
Viewing 15 posts - 4,156 through 4,170 (of 49,552 total)