Hi all,
I have a fairly simple database which is giving horrible performance when loading up my records.
In essence, I have 2 tables which are linked by a primary key and hold different information. One of these tables has 1 record only per, the other can have many.
The problem I have is that the query which is returning the "many" results gives terrible performance and will take 2-3 seconds to execute locally. This was the case when there was only a handful of records in that table.
My SQL query is as follows:-
SELECT
PID, Municipality, Address_1, Address_2, Locality, State, Postcode, Sale_date, Sale_price, Capital_value, Land_area, Land_use_code, Room_count, Building_area, Construction_year, Wall_construction_code, Roof_construction_code, Source, SaleID
FROM SaleInformation
ORDER BY Sale_date DESC
There is a lot of records in that table now (say 40,000+) and that query returns every field that matches PID (linked key).
For the life of me I cannot work out what it is that is slowing the performance and it is driving me insane!
Any help greatly appreciated.
Cheers,
Joe