Richard Huxton wrote:
> 
> Indexes on underlying tables should be used though. Difficult to suggest
> what indices you might need without knowing the view/tables/queries
> involved.

As an example I may have an "Invoice" table with several thousand invoices.
I could design a query/view "Aged" to get all unpaid invoices 
greater than 15 days old.

I would often look for Invoices per Client and should have an index on 
Invoice(ClientID).

        e.g. CREATE INDEX Invoice_ClientID ON Invoice(ClientID);


Is there any advantage in having an index on ClientID for the Aged query?

        e.g. CREATE INDEX Aged_ClientID ON Aged(ClientID);

Would this index be continually maintained by the RDBMS or only on lookup?




Keith

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to