Re: How efficient are Views

Поиск
Список
Период
Сортировка
От Andrew McMillan
Тема Re: How efficient are Views
Дата
Msg-id 1023972365.19800.354.camel@kant.mcmillan.net.nz
обсуждение исходный текст
Ответ на How efficient are Views  (John Taylor <postgres@jtresponse.co.uk>)
Список pgsql-novice
On Thu, 2002-06-13 at 03:02, John Taylor wrote:
> Hi,
>
> I'm thinking about using a view for my application.
>
> However, I'm wondering about how efficient it will be once I have a large amount of data
> loaded.
>
> Are views generated for every access ?
> Are they generated when the underlying data changes ?
>
> Whould it maybe be faster to have a seperate table alongside the base data, and
> generate it via a trigger or stored procedure ?

It depends on your ratio of queries to inserts.  It depends on the size
of your tables and the indexing that you have on them.  It depends on
whether your queries are on subsets or summaries.

On the other hand, there is no reason why queries should necessarily be
slow 'once you have a large amount of data loaded' - that depends on a
lot more database choices than just whether you use a view.

Regards,
                    Andrew.
--
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/        PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201    MOB: +64(21)635-694    OFFICE: +64(4)499-2267
       Are you enrolled at http://schoolreunions.co.nz/ yet?


В списке pgsql-novice по дате отправления:

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Optimising inside transactions
Следующее
От: Daniel Grob
Дата:
Сообщение: case-(in)sensitive Server