Re: [GENERAL] clustered index benchmark comparing Postgresql vs Mariadb

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: [GENERAL] clustered index benchmark comparing Postgresql vs Mariadb
Дата
Msg-id oo89eh$1qp$1@blaine.gmane.org
обсуждение исходный текст
Ответ на [GENERAL] clustered index benchmark comparing Postgresql vs Mariadb  (유상지<y0212@naver.com>)
Список pgsql-general
유상지 schrieb am 31.08.2017 um 04:03:
> Cluster secondary indexes were faster than those without cluster indexes in pg, but slower than mariadb.

There is no such thing as a "clustered index" in Postgres.

The Postgres "cluster" command physically sorts the rows of a table according to the sort order of an index, but that
issomething completely different then a "clustered index". The data is still stored in the index and the table.  

A clustered index in MariaDB/MySQL stores the entire table data. So the table and the index is the same thing (Oracle
callsthat an "index organized table" which describes this a lot better). As the table and index are the same thing you
can'thave two clustered indexes on the same table.  

An index in Postgres only stores the data of the indexed columns (plus an internal row identifier). There is no
technicaldifference between a primary key index and any other index. The structure and storage is always the same. So
theterm "secondary index" does not really make sense in Postgres. 




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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] clustered index benchmark comparing Postgresql vs Mariadb
Следующее
От: hamann.w@t-online.de
Дата:
Сообщение: [GENERAL] Table create time