Re: Force specific index disuse
| От | Alvaro Herrera | 
|---|---|
| Тема | Re: Force specific index disuse | 
| Дата | |
| Msg-id | 20140520174402.GI7857@eldon.alvh.no-ip.org обсуждение исходный текст | 
| Ответ на | Force specific index disuse (Steve Crawford <scrawford@pinpointresearch.com>) | 
| Ответы | Re: Force specific index disuse | 
| Список | pgsql-general | 
Steve Crawford wrote: > Is there a way to force a specific index to be removed from > consideration in planning a single query? > > Specifically, on a 60-million-row table I have an index that is a > candidate for removal. I have identified the sets of nightly queries > that use the index but before dropping it I would like to run > EXPLAIN and do timing tests on the queries to see the impact of not > having that index available and rewrite the query to efficiently use > other indexes if necessary. If you can afford to lock the table for a while, the easiest is BEGIN; DROP INDEX bothersome_idx; EXPLAIN your_query; ROLLBACK; -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-general по дате отправления: