Thread: pgsql: Update count(*) discussion ideas: < BY col {DESC} LIMIT 1.

pgsql: Update count(*) discussion ideas: < BY col {DESC} LIMIT 1.

From
momjian@svr1.postgresql.org (Bruce Momjian)
Date:
Log Message:
-----------
Update count(*) discussion ideas:

<   BY col {DESC} LIMIT 1. Completing this item involves making this
>   BY col {DESC} LIMIT 1. Completing this item involves doing this
<   invalidated if anyone modifies the table.
<
>   invalidated if anyone modifies the table.  Another idea is to
>   get a count directly from a unique index, but for this to be
>   faster than a sequential scan it must avoid access to the heap
>   to obtain tuple visibility information.
>
> * Allow data to be pulled directly from indexes
>
>   Currently indexes do not have enough tuple tuple visibility
>   information to allow data to be pulled from the index without
>   also accessing the heap.  One way to allow this is to set a bit
>   to index tuples to indicate if a tuple is currently visible to
>   all transactions when the first valid heap lookup happens.  This
>   bit would have to be cleared when a heap tuple is expired.
>

Modified Files:
--------------
    pgsql/doc:
        TODO (r1.1434 -> r1.1435)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/TODO.diff?r1=1.1434&r2=1.1435)