Re: rtree/gist index taking enormous amount of space in 8.2.3

Поиск
Список
Период
Сортировка
От Craig James
Тема Re: rtree/gist index taking enormous amount of space in 8.2.3
Дата
Msg-id 46852FD0.2030306@emolecules.com
обсуждение исходный текст
Ответ на Re: rtree/gist index taking enormous amount of space in 8.2.3  ("Dolafi, Tom" <dolafit@janelia.hhmi.org>)
Ответы Re: rtree/gist index taking enormous amount of space in 8.2.3  ("Dolafi, Tom" <dolafit@janelia.hhmi.org>)
Список pgsql-performance
Dolafi, Tom wrote:
> min(fmin) |   max(fmin)    |    avg(fmin)
>    1      |   55296469     |    11423945
>
> min(fmax) |   max(fmax)    |    avg(fmax)
>   18      |   55553288     |    11424491
>
> There are 5,704,211 rows in the table.

When you're looking for weird index problems, it's more interesting to know if there are certain numbers that occur a
LOT. From your statistics above, each number occurs about 10 times in the table.  But do some particular numbers occur
thousands,or even millions, of times? 

Here is a query that will print a list of the highest-occuring values.  You might expect a few occurances of 20, and
maybe30, but if you have thousands or millions of occurances of certain numbers, then that can screw up an index. 

   select fmax, c from
    (select fmax, count(fmax) as c from your_table group by fmax) as foo
   where c > 3 order by c desc;

Craig


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

Предыдущее
От: "Dolafi, Tom"
Дата:
Сообщение: Re: rtree/gist index taking enormous amount of space in 8.2.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: rtree/gist index taking enormous amount of space in 8.2.3