Re: discarding duplicate indexes

Поиск
Список
Период
Сортировка
От Gavin Flower
Тема Re: discarding duplicate indexes
Дата
Msg-id 50D2CBC4.6070006@archidevsys.co.nz
обсуждение
Ответ на discarding duplicate indexes  (Josh Kupershmidt <schmiddy@gmail.com>)
Ответы Re: discarding duplicate indexes
Re: discarding duplicate indexes
Список pgsql-hackers
On 20/12/12 14:57, Josh Kupershmidt wrote:
CREATE TABLE test (id int);
CREATE INDEX test_idx1 ON test (id);
CREATE INDEX test_idx2 ON test (id);
I initially misread your example code, but after I realised my mistake, I thought of an alternative scenario that might be worth considering.
CREATE TABLE test (id int, int sub, text payload);
CREATE INDEX test_idx1 ON test (id, sub);
CREATE INDEX test_idx2 ON test (id);


Now test_idx2 is logically included in test_idx1, but if the majority of transactions only query on id, then test_idx2 would be more better as it ties up less RAM

Cheers,
Gavin


		
	

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