Re: Query performance question

Поиск
Список
Период
Сортировка
От Lukas Ertl
Тема Re: Query performance question
Дата
Msg-id Pine.BSF.4.33.0103291141270.17729-100000@pcle2.cc.univie.ac.at
обсуждение исходный текст
Ответ на Query performance question  (Lukas Ertl <l.ertl@univie.ac.at>)
Список pgsql-novice
On Thu, 29 Mar 2001, Vijay Deval wrote:

> URL is a very large field.  If an extra field is created which gives a
> neumeric id to the url, run the query on the number, and then get the desired
> output

I have to admit, that I quite don't understand what you want me to do
here... I already have that numeric id:

> > httplog=# \d referrer
> >           Table "referrer"
> >  Attribute |     Type     | Modifier
> > -----------+--------------+----------
> >  id        | integer      |
> >  url       | varchar(300) |
> > Index: referrer_pkey

If I say:

SELECT count(*), referrer.id FROM hits, referrer WHERE referrer.id =
referrer_id GROUP BY referrer.id ORDER BY count DESC LIMIT 10;

it is really fast and I get the IDs of the referrer-urls but how would I
get the URLs then?

regards,
le

--
Lukas Ertl                          eMail: l.ertl@univie.ac.at
WWW-Redaktion                       Tel.:  (+43 1) 4277-14073
Zentraler Informatikdienst (ZID)    Fax.:  (+43 1) 4277-9140
der Universität Wien


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

Предыдущее
От: Ernest Chiarello
Дата:
Сообщение: Re: create rule and last record
Следующее
От: Vijay Deval
Дата:
Сообщение: Re: Query performance question