functional indexes and their costs

Поиск
Список
Период
Сортировка
От Adam
Тема functional indexes and their costs
Дата
Msg-id 1047591402.26998.27.camel@ahansen.ofsloans.com
обсуждение исходный текст
Ответы Re: functional indexes and their costs
Список pgsql-general
refer to the following 2 querys which were run after a vacuum analyze...

=# EXPLAIN SELECT * FROM sales_personal WHERE last_name='hansen';
NOTICE:  QUERY PLAN:

Index Scan using sales_personal_last_name_index on sales_personal
(cost=0.00..280.68 rows=81 width=618)

EXPLAIN
=#EXPLAIN SELECT * FROM sales_personal WHERE lower(last_name)='hansen';
NOTICE:  QUERY PLAN:

Index Scan using test_lower_idx on sales_personal  (cost=0.00..5827.83
rows=1642 width=618)

EXPLAIN

anyone have any idea why the cost of using the functional index is so
much greater than the cost of using the regular (unfunctioned) index on
the same column?





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