Click here to Skip to main content
15,918,808 members
Home / Discussions / Database
   

Database

 
Questionquery with aggregate Pin
rm_suprapto1-Feb-09 18:02
rm_suprapto1-Feb-09 18:02 
AnswerRe: query with aggregate Pin
Wendelius1-Feb-09 18:08
mentorWendelius1-Feb-09 18:08 
GeneralRe: query with aggregate Pin
rm_suprapto1-Feb-09 23:58
rm_suprapto1-Feb-09 23:58 
GeneralRe: query with aggregate Pin
Wendelius2-Feb-09 0:30
mentorWendelius2-Feb-09 0:30 
QuestionUnicode? Pin
Ali_1001-Feb-09 9:23
Ali_1001-Feb-09 9:23 
AnswerRe: Unicode? Pin
Colin Angus Mackay1-Feb-09 12:30
Colin Angus Mackay1-Feb-09 12:30 
Questionclustered index is 1 in table?then/// Pin
Ali_1001-Feb-09 9:14
Ali_1001-Feb-09 9:14 
AnswerRe: clustered index is 1 in table?then/// Pin
Colin Angus Mackay1-Feb-09 12:40
Colin Angus Mackay1-Feb-09 12:40 
waqarnaeem2@hotmail.com wrote:
there is confusion


Indeed there is. I'm having some difficulty parsing your question.


waqarnaeem2@hotmail.com wrote:
clustered index is 1 in table


There can only be one clustered index in a table.

waqarnaeem2@hotmail.com wrote:
they match the physical & logical records


The physical rows kind of follow the clustered index. It isn't exact, but the general idea is that the rows are physically sequenced by the clustered index however, SQL Server performs many optimisations that means that it doesn't follow that except in the simplest of circumstances.


waqarnaeem2@hotmail.com wrote:
so what nonclustered index is more than 1 in a table


You can have many non-clustered indexes on a table.


waqarnaeem2@hotmail.com wrote:
How they work??


The same way as an index in a book. The non-clustered area consists of a number of pages which contain look up information that can be used to find the physical rows faster than you would be able to if you had to scan the whole table to find the same information.


waqarnaeem2@hotmail.com wrote:
then they increase the congestion 2much


What congestion? They will requires a little more IO for the lookup, but the idea is that the extra up-front work pays off as you can find the actual data much faster and using less IO overall. In some queries there may even be enough information in the index to never need to look at the physical rows at all. This makes everything much faster and less congested.

However, when you insert, update or delete from a table with non-clustered indexes you have to remember that SQL Server will also have to update the indexes as well as the actual physical row.


waqarnaeem2@hotmail.com wrote:
y prefer 1 to another in what sense?


If you want more than one index on a table then you have no choice as you must use a non-clustered index at some point. Typically the clustered index is on your primary key

*Developer Day Scotland - Free community conference
*Colin Angus Mackay's Blog
*Latest Scottish Developers Newsletter


Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Remember that the force of gravity can go up as well as down.

Generaldatabase query Pin
Ali_1001-Feb-09 8:13
Ali_1001-Feb-09 8:13 
GeneralRe: database query Pin
Wendelius1-Feb-09 8:24
mentorWendelius1-Feb-09 8:24 
GeneralRe: database query Pin
Blue_Boy1-Feb-09 23:11
Blue_Boy1-Feb-09 23:11 
QuestionSQL Query help needed please Pin
munklefish1-Feb-09 0:42
munklefish1-Feb-09 0:42 
AnswerRe: SQL Query help needed please Pin
Wendelius1-Feb-09 7:05
mentorWendelius1-Feb-09 7:05 
Questiondelete query in sql Pin
billcodes1-Feb-09 0:01
billcodes1-Feb-09 0:01 
AnswerRe: delete query in sql Pin
Eddy Vluggen1-Feb-09 0:38
professionalEddy Vluggen1-Feb-09 0:38 
GeneralRe: delete query in sql Pin
Rob Graham1-Feb-09 5:50
Rob Graham1-Feb-09 5:50 
GeneralRe: delete query in sql Pin
Eddy Vluggen1-Feb-09 7:07
professionalEddy Vluggen1-Feb-09 7:07 
AnswerRe: delete query in sql Pin
Rob Graham1-Feb-09 5:47
Rob Graham1-Feb-09 5:47 
GeneralRe: delete query in sql Pin
Wendelius1-Feb-09 8:27
mentorWendelius1-Feb-09 8:27 
QuestionOutputDebugString / Trace in SQL Pin
Green Fuze31-Jan-09 10:31
Green Fuze31-Jan-09 10:31 
AnswerRe: OutputDebugString / Trace in SQL Pin
Wendelius31-Jan-09 10:36
mentorWendelius31-Jan-09 10:36 
GeneralRe: OutputDebugString / Trace in SQL Pin
Green Fuze31-Jan-09 10:40
Green Fuze31-Jan-09 10:40 
GeneralRe: OutputDebugString / Trace in SQL Pin
Wendelius31-Jan-09 10:51
mentorWendelius31-Jan-09 10:51 
GeneralRe: OutputDebugString / Trace in SQL Pin
Green Fuze31-Jan-09 10:58
Green Fuze31-Jan-09 10:58 
GeneralRe: OutputDebugString / Trace in SQL [modified] Pin
Wendelius31-Jan-09 11:12
mentorWendelius31-Jan-09 11:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.