Viewing 15 posts - 24,826 through 24,840 (of 49,552 total)
Without seeing the exec plan, it's a guess, but it's probably scanning because of the larger row count, it's more efficient.
Just one thing, why oh why oh why count('x')? What's...
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
July 19, 2011 at 9:16 am
EdA ROC (7/19/2011)
I thought (wrote in my notes) the PK was the clustered index.
By default it is, but that's by default only and not by requirement
I think there 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
July 19, 2011 at 8:53 am
krypto69 (7/19/2011)
ahhh...so if it has to go the row specified in the where..then it's able to count along the way?
Not counting along the way, locating the rows 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
July 19, 2011 at 8:49 am
Get rid of it. You're preventing index usage by using the function there, most likely reducing the join performance as well.
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
July 19, 2011 at 8:00 am
Run it when the system is slow. Taking a trace that's intended to catch slow-running queries and running it at a time when the server is idle is counter-productive. 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
July 19, 2011 at 7:43 am
sys.partitions is a count of all rows in the table, nothing more.
If you want to count rows of a query, use count(*) (count('x') just looks silly). It will be...
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
July 19, 2011 at 7:42 am
and why every database should have backups, test/dev or not.
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
July 19, 2011 at 7:38 am
Without a backup or source control, no.
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
July 19, 2011 at 1:55 am
Can you post both execution plans 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
July 19, 2011 at 1:53 am
p.s. RlsState - NVARCHAR(1)???
That's bad practice in a number of ways. It takes a minimum of 4 bytes to store 1 character. For something so small it should be CHAR(1)...
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
July 18, 2011 at 3:11 pm
Looks about right. If JobNum/FormNum combination is unique then that should be enforced with a unique index.
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
July 18, 2011 at 3:08 pm
See the first article I referenced
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
July 18, 2011 at 3:08 pm
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
July 18, 2011 at 2:18 pm
GSquared (7/18/2011)
GilaMonster (7/18/2011)
Craig Farrell (7/18/2011)
Note to self: Do not try to market in South Africa. They don't want to be trained. :hehe:
We have a very odd culture around...
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
July 18, 2011 at 12:55 pm
Craig Farrell (7/18/2011)
Note to self: Do not try to market in South Africa. They don't want to be trained. :hehe:
We have a very odd culture around value 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
July 18, 2011 at 12:34 pm
Viewing 15 posts - 24,826 through 24,840 (of 49,552 total)