Re: efficient storing of urls

Поиск
Список
Период
Сортировка
От Chris Browne
Тема Re: efficient storing of urls
Дата
Msg-id 6065dsoy4n.fsf@dev6.int.libertyrms.info
обсуждение исходный текст
Ответ на efficient storing of urls  (Shane Wegner <shane-keyword-pgsql.a1e0d9@cm.nu>)
Список pgsql-general
shannyconsulting@earthlink.net (Sean Shanny) writes:
> Can you give an example of a query that has gotten slower due to the
> increasing size of the urls table with an explain analyze?

There's a "known issue" in that URL strings commonly contain the prefix:

   http://www.

What you get, as a result, is that there's very little uniqueness
there, and indices are known to suffer.

There was a report last week that essentially putting the URLs in
backwards, and having a functional index on the backwards form, led to
greatly improved selectivity of the index.

The approach being suggested here looks more like that of the "prefix
splitting" typical to Patricia Tries; that's what the New Oxford
English Dictionary project used for building efficient text search
indices.  It ought to be pretty quick, but pretty expensive in terms
of the complexity that gets added in.

I suspect that doing the "reverse the URL" trick would be a cheaper
"fix."
--
"cbbrowne","@","ntlug.org"
http://www.ntlug.org/~cbbrowne/linuxxian.html
"This .signature is  shareware.  Send in $20 for  the fully registered
version..."

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: PLSQL Question regarding multiple inserts
Следующее
От: "Mike Wertheim"
Дата:
Сообщение: help with correlated delete and outer join