Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd)
От
Brian E Gallew
Тема
Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd)
Дата
Msg-id
emacs-smtp-1573-14361-10215-998688@export.andrew.cmu.edu
Ответ на
Список
Дерево обсуждения
Bug#48582: psql spends hours computing results it already knows (fwd) "Oliver Elphick" <olly@lfix.co.uk>
Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd) "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd) Brian Ristuccia <brianr@osiris.978.org>
Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd) Brian E Gallew <geek+@cmu.edu>
Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Bug#48582: psql spends hours computing results it already knows (fwd) Brian E Gallew <geek+@cmu.edu>
Then spoke up and said:
> Vadim will have to check me on this, but I believe that index entries
> don't contain transaction information --- that is, you can determine
> whether a tuple matches a specified search key by examining the index,
> but in order to discover whether the tuple is actually *valid*
> (according to your transaction's worldview) you must fetch the tuple
> itself from the main table. So scanning an index cannot be cheaper than
> a sequential scan of the main table, except when the index allows you to
> avoid visiting most of the tuples in the main table.
Right. As usual, I've overlooked something obvious. So, this really
wouldn't work unless we had an exclusive table lock ('cause then there
wouldn't be any other transactions to worry about, except for our
own). Feh.
--
=====================================================================
| JAVA must have been developed in the wilds of West Virginia. |
| After all, why else would it support only single inheritance?? |
=====================================================================
| Finger geek@cmu.edu for my public key. |
=====================================================================
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Zeugswetter Andreas IZ5
Дата: