Re: Query Performance
- From: "Adam Machanic" <amachanic@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 23 Apr 2005 08:31:20 -0400
Can you test it on your end?
--
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"Ash" <Ash@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:35B4DB69-229F-41F4-8232-339934FDC681@xxxxxxxxxxxxxxxx
> So which scenario would the join run faster (I'm talking about > 2,000,000
> records in each table)
>
> 1)ID is PK, F1 & F2 are unique and index
> table1 table2
> ID <IDENTITY> ID<IDENTIT>
> F1<CHAR(10)> F1<CHAR(10)>
> F2<CHAR(10)> F2<CHAR(10)>
> F3<CHAR(10)> F4<CHAR(10)>
> SELECT * FROM table1 t1,table2 t2 WHERE t1.ID=t2.ID AND t1.f1='Somthing'
AND
> t1.f2='Somthing Else'
>
> 2)F1 & F2 are PK and index
> table1 table2
> F1<CHAR(10)> F1<CHAR(10)>
> F2<CHAR(10)> F2<CHAR(10)>
> F3<CHAR(10)> F4<CHAR(10)>
> SELECT * FROM table1 t1,table2 t2 WHERE t1.f1=t2.f1 AND t1.f2=t2.f2 AND
> t1.f1='Somthing' AND t1.f2='Somthing Else'
>
> Thanks
.
- References:
- Query Performance
- From: Ash
- Query Performance
- Prev by Date: RE: Please help me - Getting error when creating MDT data mining model
- Next by Date: Re: DMO challenged!
- Previous by thread: Query Performance
- Next by thread: Re: Query Performance
- Index(es):