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.
| Author |
Topic |
|
wkm1925
Posting Yak Master
207 Posts |
Posted - 2008-05-06 : 10:48:34
|
| i've these following table and datatblCameraTransID | BranchID | X | Y | TransDate---------------------------------------------1 | 12 | 90 | 76 | 3/12/20072 | 9 | 45 | 79 | 3/12/20073 | 12 | 69 | 34 | 3/12/20074 | 12 | 78 | 56 | 3/12/20075 | 9 | 67 | 35 | 3/12/20076 | 12 | 78 | 56 | 3/12/2007*TransID is a primary keytblBranchBranchID | BranchName--------------------------9 | Kota Raja10 | Kota Alam11 | Kota Lama12 | Kota Tua13 | Kota Hantu*BranchID is a primary keyWhich column need to put an index? Can anyone show me the best way? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-06 : 11:07:57
|
| Clustered on tblCamera.TransID,tblBransc.BranchIDNonClustered on tblCamera.BranchID |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-05-06 : 16:00:05
|
| What are the most common queries run on those tables?How big do you expect them to get?--Gail Shaw |
 |
|
|
wkm1925
Posting Yak Master
207 Posts |
Posted - 2008-05-06 : 21:43:53
|
| Queries will return more than 2 millions of row. This is the most queries run on those tables.SELECT b.MAIN_IDFROM tblCamera AS a INNER JOINtblBranch AS b ON a.BranchID = b.BranchIDORDER BY a.BranchID |
 |
|
|
|
|
|