I have two table that looks like this:
Table1
- province
- land
Table2
- province
- nw
Both tables contains 5000 records and most but not all of the provinces in one table can be found in the other table.
Now my problem is that I often need to select all or certain records from either the Table2.nw or the Table1.land columns but ONLY where the province in one table exist in the other.
Heres an example of how I do it today:
SELECT * table1 l,table2 n WHERE l.province=n.province ORDER BY land
This works fine but it takes forever on my slow server. Can anyone please newbieme of how to do this faster ? Maybe by indexes or join in some way ?