General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Kevin
The second query wouldn't optimise the referral table because you are selecting all the records from the referral table where they match records records in sclient tab so all referral records have to be checked . Sclient has no index so cannot be optimised.
You should index the tables on deleted(). Then the following query is optimised if DELETED is set ON because referral will be checked for deleted records
SELECT *;
FROM Referral ;
WHERE referral.Cl_Ref IN (SELECT CL_REF ;
FROM Client WHERE Do_Ref = "035" )
Nick Mason
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only