Re: Interesting speed anomaly

Поиск
Список
Период
Сортировка
От Gavin Sherry
Тема Re: Interesting speed anomaly
Дата
Msg-id Pine.LNX.4.58.0512150901030.17347@linuxworld.com.au
обсуждение исходный текст
Ответ на Re: Interesting speed anomaly  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
Ответы Re: Interesting speed anomaly  (Gavin Sherry <swm@linuxworld.com.au>)
Список pgsql-hackers
On Wed, 14 Dec 2005, Zoltan Boszormenyi wrote:

> Tom Lane írta:
>
> >Zoltan Boszormenyi <zboszor@dunaweb.hu> writes:
> >
> >
> >>$ time echo "select * from v_invoice_browse where code||inv_no = 'CARO200000020'" | dbaccess db
> >>
> >>
> >
> >
> >
> >>Is there a way to speed this operation up?
> >>
> >>
> >
> >Make an expression index on "code||inv_no", if you think this case is
> >important enough to be worth maintaining an extra index for.
> >
> >(This is not on-topic for -hackers, IMHO.  Try pgsql-perform.)
> >
> >            regards, tom lane
> >
> >
> >
>
> Thanks for both the hint and the pointer to the mailing list.
> My problem is, I can't see how could I create any index on a view.
> PostgreSQL refuses it:
>
> create index iinvbrowse1 on v_invoice_browse ((code||inv_no));
> ERROR:  "v_invoice_browse" is not a table
>
> Creating indexes on the 12 invoice tables, like this:
>
> create index iinvoice1 on invoice1 (('PREFIX'||id));

Are you creating the index on (core || id) on on the string 'PREFIX' or
some other literal?

Gavin


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

Предыдущее
От: "Francisco Figueiredo Jr."
Дата:
Сообщение: Re: [Bulk] Re: [Bug] Server Crash, possible security exploit,
Следующее
От: Gavin Sherry
Дата:
Сообщение: Re: Interesting speed anomaly