Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 query on more than 100 million rows

Author  Topic 

wkm1925
Posting Yak Master

207 Posts

Posted - 2012-01-17 : 11:31:01
I've more than 100 million rows stored into 1 table

My question as following,
1. If I create an appropriate indexes on my above table, even 200 million rows stored in 1 table, there's no problem in term of performance

Need explanation, how powerful an appropriate index

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-17 : 12:14:48
go get a phonebook (does anyone know what these things are now?0

and I want you to look up every reference to 'KAISER'

The data is in no particular order

you now MUST go page by page from page 1 thru page nnn to look for every occurance

OR you can have an Index (those names on the top of each page) so you can go directly to the pages that has all of the Kaisers listed on them

Which do YOU Think is faster?

And when's the test or the interview?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

wkm1925
Posting Yak Master

207 Posts

Posted - 2012-01-17 : 12:31:42
Sir,

Nothing to do with the test. I'm a novice to play with index.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-17 : 13:32:40
well did the explanation make sense to you?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

skybvi
Posting Yak Master

193 Posts

Posted - 2012-01-18 : 10:03:38
clustered or non clustered index are faster than normal retrival for data


Regards,
Sushant
DBA
Virgin Islands(U.K)
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2012-01-18 : 10:30:00
quote:

clustered or non clustered index are faster than normal retrival for data


Nope. Or at least very simplified

So a little primer.

Take brett's analogy of the phonebook.

The book has pages. Data lives on these pages. But it also has an order. the rows are in order of surname, firstname, address.

That order (surname, firstname, address) is the CLUSTERED INDEX of the phonebook (the data is PHYSICALLY in that order).

Therefore searching for surnames beginning 'SN', is very quick.

However, searching for all firstnames of 'Charlie' is impossible without scanning the entire book.

you could make an index on Firstname which has a lookup value (page number and row number), where you could quickly find people. This is a NONCLUSTERED INDEX of the phone book. To get the details of the people you woul have to LOOK UP the page from the NONCLUSTERED index to get the value.

Hope that helps.

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2012-01-18 : 13:19:33
I thought a "normal" retrieval of data WAS using an index ... well, we don't have no stinking Heaps here ...
Go to Top of Page

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2012-01-18 : 13:26:26
Hello wkm1925,

Proper index usage and selection are very important for seek performance in RDBMS, but also the size and width of the table will determine the efficiency and speed of a search because data is stored on pages of a fixed size and the wider the rows, the more pages are required. So table design is also a factor in performance and should be considered in design based on need and data growth.

FWIW. HTH.

Go to Top of Page
   

- Advertisement -