I'm in interested in learning about database management and was just wondering if anybody can help me with the following query.
I want to improve the performance of a joined query that retrieves over 43000 rows of data. The following syntax retrieves the data needed.
SELECT ow.ForeName, ow.Email, pr.Type
FROM dbo.Owners ow
INNER JOIN dbo.PropertyType pt ON pt.OwnerID = ow.OwnerID
INNER JOIN dbo.Properties pr ON pr.TypeID = pt.TypeID
WHERE pr.Type = 'Penthouse'
What would be peoples suggestion about indexes and where to create them as I'm not sure where to use them to improve the I/O cost and the CPU Cost.