Viewing 15 posts - 21,496 through 21,510 (of 49,552 total)
Revenant (12/29/2011)
External drives are insufficient - think a fire in the computer room.
USB drives are slow and they represent security risk. Our prod servers have USB ports...
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
December 29, 2011 at 11:34 am
p.s. Singleton lookups are the one thing that won't be affected by fragmentation at 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
December 29, 2011 at 11:25 am
That 35% fragmentation is in a non-leaf level of your index, a level that has much fewer pages than the leaf and will be much less affected by fragmentation anyway...
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
December 29, 2011 at 11:22 am
Oh, another way to get 50 random rows, one at a time with no repeats:
CREATE TABLE #Random (
Seq INT IDENTITY,
name_emp varchar(50)
)
INSERT INTO #Random (name_emp)
SELECT TOP (50) name_emp...
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
December 29, 2011 at 10:38 am
Dev (12/29/2011)
It will repeat but not toooo frequently.
3 times in 10 rows in one test I did.
Does random mean not to repeat the value in 50 attempts? 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
December 29, 2011 at 10:34 am
xRafo (12/29/2011)
how would you do that?,maybe a good idea!
Create a table for values you've already seen (just the PK column) and then exclude those from the query.
Something roughly like this
SELECT...
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
December 29, 2011 at 10:24 am
Stefan Krzywicki (12/29/2011)
GilaMonster (12/29/2011)
Stefan Krzywicki (12/29/2011)
I don't have room on my machine either.Two words: External harddrive.
Seriously, I've had to do that once or twice.
I can't even get them to buy...
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
December 29, 2011 at 10:20 am
Dev (12/29/2011)
Place rand() * 100 function in your WHERE clause.Example:
WHERE some_int_column= rand() * 100 -- or cast it as INT
That's not more or less random than ordering by...
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
December 29, 2011 at 10:18 am
How random do you need that row, and how large is the table? Is there an identity column?
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
December 29, 2011 at 9:35 am
GSquared (12/29/2011)
Stefan Krzywicki (12/29/2011)
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
December 29, 2011 at 9:34 am
Stefan Krzywicki (12/29/2011)
I don't have room on my machine either.
Two words: External harddrive.
Seriously, I've had to do that once or twice.
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
December 29, 2011 at 9:32 am
Grant Fritchey (12/29/2011)
GilaMonster (12/29/2011)
Grant Fritchey (12/27/2011)
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
December 29, 2011 at 9:29 am
There are a few ways, depends how random you need it. This one's not particularly efficient, will give you a different row each time.
SELECT TOP (1) name_emp FROM employees ORDER...
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
December 29, 2011 at 9:24 am
Vertigo44 (12/29/2011)
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
December 29, 2011 at 8:58 am
Grant Fritchey (12/27/2011)
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
December 29, 2011 at 8:28 am
Viewing 15 posts - 21,496 through 21,510 (of 49,552 total)