Viewing 15 posts - 46,771 through 46,785 (of 49,552 total)
matt stockham (4/24/2008)
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
April 24, 2008 at 11:40 pm
karthikeyan (4/24/2008)
it means select @Null = count(*) from #t1 where Age is null. do u agree till this point ?
No!
It means
select @Null = count(*) from #t1 where 'Age'...
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
April 24, 2008 at 11:40 pm
No. You can generalise my 2 column example to as many columns as you have in the index.
For example, a 3 column index (A, B, C) is most optimal 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
April 24, 2008 at 7:19 am
Scalar = single value
Hence, the where clause you had (@Nm IS NULL) is a scalar (single value) evaluation, because it's a single value (the contents of the variable) been compared...
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
April 24, 2008 at 7:11 am
Yes, and I did. See the last post on page 1.
If there's anything you're still not sure of, ask specifically.
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
April 24, 2008 at 6:35 am
I've seen a case where a person took the most-selectivel advice literally, and made the leading column of every index the primary key (an identity)
He was very curious as 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
April 24, 2008 at 5:58 am
Please don't cross post. Many of us read all the frums.
No replies to this thread please. Direct all replies to-
http://www.sqlservercentral.com/Forums/Topic489793-7-1.aspx
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
April 24, 2008 at 5:08 am
And some testing...
SET STATISTICS IO ON
GO
SET STATISTICS TIME ON
GO
CREATE TABLE TestingIndexOrder (
ID INT IDENTITY,
DayOfWeek smallint,
CustomerKey int
)
GO
insert INTO TestingIndexOrder (DayOfWeek, CustomerKey)
SELECT DATEPART(dw,DATEADD(dd,number, '1900/01/01')), FLOOR(RAND(number*5452)*1000)
FROM (
SELECT TOP 4000000 v1.number,...
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
April 24, 2008 at 4:13 am
If the values aren't in quotes, SQL interprets then as columns.
Try something like this (partial query only)
INSERT INTO ....
SELECT ''' + @EmployeeCode + ''', ....
Easiest way to find 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
April 24, 2008 at 2:11 am
In management studio, right click the database Tasks ->Generate scripts
Script everything out. Then run that script on your sQL 2000 server. Taht will create the shell of the DB. All...
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
April 24, 2008 at 12:46 am
If the database has never had a full backup, even in full recovery it won't keep the logs. There has to be a full backup taken before SQL starts retaining...
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
April 24, 2008 at 12:28 am
Oh, and with the selectivity you're talking about (1000 unique values in 10 million rows), if that index is not covering, SQL is not going to use that index. Too...
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
April 24, 2008 at 12:25 am
The index is implemented much like a telephone directory. If you have a composite index (colour, age as a very contrived example) then the index pages look something like this
Black...
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
April 24, 2008 at 12:24 am
You'll have to script the database structure, bcp the data out and then recreate the DB on SQL 2000 and import the data. There's no downgrade option for SQL.
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
April 24, 2008 at 12:12 am
Check the database's status in the sys.databases view. Is it restoring or recovering?
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
April 24, 2008 at 12:10 am
Viewing 15 posts - 46,771 through 46,785 (of 49,552 total)