Hi Kev
Can't be sure but I'd imagine no 1 would be quicker, in that I envision the mechanism of 2-table queries like this as just iterating through the 1st table and searching for matches in the 2nd, for each rec visited. So, the "many" searches are on a shorter table.
Sped up by having them both ordered on the search field of course.
Why not run both with:
ldTime1 = TIME()
Select ...
ldTime2 = TIME()
lnNoSecs = ldTime2 - ldTime1
and suck it and see?
Terry
>Hi all
>
>I have a particular scenario and I wanted to know if the table I specify in the FROM will have any affect on performance, take this example:
>
>Table1 - 200,000 records
>Table2 - 17,000 records
>
>Table1 can have 0 or 1 records in Table2.
>
>Will this:
>
>
select *
>from Table1
>inner join Table2
>on Table1.PK = Table2.FK
>
>
>perform worse than this:
>
>
select *
>from Table2
>inner join Table1
>on Table2.FK = Table1.PK
>
>
>Just curious, given that Table1 has more records than Table2 - will the above queries result in different performance?
>
>Thanks
>Kev
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.