Roji. P. Thomas
"Deepson Thomas" <DeepsonThomas@discussions.microsoft.com> wrote in message
news:6218FB59-2418-4BE4-A686-6AF5E217B0CE@microsoft.com...
>
> Hi Roji,
> i got ur point, like u want to increase the load on query so that i can
> visually view the time diff. but actually seeing the time diff is not my
> need. what i want to know is about the behaviour of sql server in
> executing
> queries when ther table / colums have different constraints like clustered
> /
> Non Clustered index,PK etc... hope u understand my need
>
> Regards
> Deepson
>
> "Roji. P. Thomas" wrote:
>
>> Deepson,
>>
>> Instead of doing SELECT * FROM tbl1,
>> add a WHERE clause on the ProdCode and
>> you can see the difference.
>>
>>
>> --
>> Roji. P. Thomas
>> Net Asset Management
>>
https://www.netassetmanagement.com >>
>>
>> "Deepson Thomas" <DeepsonThomas@discussions.microsoft.com> wrote in
>> message
>> news:A705E419-4CB6-4E13-8090-9DE09BF41A11@microsoft.com...
>> > There are three tables and all tables contains 100000 records and
>> > contains
>> > exactly same data., u can say each table is a carbon copy of other one.
>> >
>> > i executed 4 queries as follows
>> > 1) SELECT * FROM tbl1
>> > 2) SELECT * FROM tbl2
>> > 3) SELECT * FROM tbl3
>> > 4) SELECT * FROM tbl4
>> >
>> > what i want to know is which query will execute faster and why. now may
>> > be
>> > u
>> > can ask y dont i try this myself...i tried in my PC but the results are
>> > same..may b coz itz a new fast machine or may be even the db and the
>> > application is in the same machine... whatever i didnt got the exact
>> > result i
>> > want ... hope anybody can help me ... the table structures and the
>> > constrains
>> > are listed below
>> >
>> > ##############################
>> > Table 1 - tbl1
>> > ##############################
>> > id int NOT NULL identity(1,1)
>> > ProdCode VarChar(10) NOT NULL
>> > ProdName varcChar(200) NOT NULL
>> >
>> >
>> > ##############################
>> > Table 2 - tbl2
>> > ##############################
>> > id int NOT NULL identity(1,1)
>> > ProdCode VarChar(10) NOT NULL PK
>> > ProdName varcChar(200) NOT NULL
>> >
>> >
>> > ##############################
>> > Table 3 - tbl3
>> > ##############################
>> > id int NOT NULL identity(1,1)
>> > ProdCode VarChar(10) NOT NULL Index - Clustered
>> > ProdName varcChar(200) NOT NULL
>> >
>> >
>> > ##############################
>> > Table 4 - tbl4
>> > ##############################
>> > id int NOT NULL identity(1,1)
>> > ProdCode VarChar(10) NOT NULL Index - NON Clustered
>> > ProdName varcChar(200) NOT NULL
>> >
>> >
>> > Thanks in advance
>> > Deepson Thomas
>> >
>>
>>
>>