Re: Index on View ?
| От | Keith Gray |
|---|---|
| Тема | Re: Index on View ? |
| Дата | |
| Msg-id | 3ACCFC73.1A2EEC1A@heart.com.au обсуждение исходный текст |
| Ответ на | Index on View ? (Keith Gray <keith@heart.com.au>) |
| Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: