Hi,
I'm trying to increase the performance of my database by using clustered and non clustered indexes, but the retrieval time seems to be high. When only have clustered indexes on my 3 tables the retrieval time is 3 seconds, but when i add non clustered indexes the retrieval time is 6 seconds??
I have 3 tables.
ProperyType PropertyDetails Owner
TypeID (PK, clustered) DetailsID (PK, clustered) OwnerID (PK, Clustered)
PropertyType (non clustered) TypeID (FK, Non clustered) ForeName
OwnerID (FK) SurNameAnd i use the following syntax to retrieve the data:
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'
Can anybody offer any advice on to improve the performance and if my indexes are correct? The most commonly used columns are the ones with non clustered indexes on them.