Re: Query Performance question

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Query Performance question
Дата
Msg-id 53C32B20.8010100@fuzzy.cz
обсуждение исходный текст
Ответ на Query Performance question  ("Magers, James" <James.Magers@turner.com>)
Ответы Re: Query Performance question  ("Magers, James" <James.Magers@turner.com>)
Список pgsql-performance
On 14.7.2014 00:55, Magers, James wrote:
> I am using a Pentaho process to access the database and select the
> appropriate information to update the DB tables and records.  I am
> trying to select the previous subscription key in order to update the
> factable for any records that have the previous key to have the current
> subscription key. This query is intended to use the current subscription
> key and subscription info to select the previous subscription key to
> allow for the information to be updated.  I would like to optimize the
> query to execute more efficiently.
>
> The database table has about 60K records in it and when I run an explain
> anaylyze it indicates that the query optimizer chooses to execute a
> bitmap heap scan, this seems like an inefficient method for this query.

Why do you think it's inefficient? The planner thinks it's efficient,
for some reason. And it's impossible to say if that's a good decision,
because we don't know (a) the explain plan, and (b) structure of the
table involved (indexes, ...).

Please post the explain analyze output to explain.depesz.com and post
the link here (it's more readable than posting it here directly).

Also, please do this:

  SELECT relname, relpages, reltuples
    FROM pg_class WHERE relname = 'member_subscription_d'

and this

  \d member_subscription_d

and post the results here.

regards
Tomas


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

Предыдущее
От: "Magers, James"
Дата:
Сообщение: Query Performance question
Следующее
От: "Magers, James"
Дата:
Сообщение: Re: Query Performance question