depending on the use-case there are two ways to improve the situation
* just work without count, if you never show the page-count. Then the
paginator can just return empty results if the end is near.
* use rough estimations for the page-count, perhaps with some security
margin. For example PostgreSQL supports this by using {{EXPLAIN}}, based
on the table statistics.
I want to
* extend the paginator to support both (infinite and estimate)
* provide an option for {{ModelAdmin}} that let's you use the estimation-
paginator.
* or perhaps even support the infinite-paginator, this would also include
interface changes to the pagination.
--
Ticket URL: <https://code.djangoproject.com/ticket/26451>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> We often have problems with bigger tables and slow {{count(*)}}
> performance.
>
> depending on the use-case there are two ways to improve the situation
> * just work without count, if you never show the page-count. Then the
> paginator can just return empty results if the end is near.
> * use rough estimations for the page-count, perhaps with some security
> margin. For example PostgreSQL supports this by using {{EXPLAIN}}, based
> on the table statistics.
>
> I want to
> * extend the paginator to support both (infinite and estimate)
> * provide an option for {{ModelAdmin}} that let's you use the estimation-
> paginator.
> * or perhaps even support the infinite-paginator, this would also include
> interface changes to the pagination.
New description:
We often have problems with bigger tables and slow {{{count(*)}}}
performance.
depending on the use-case there are two ways to improve the situation
* just work without count, if you never show the page-count. Then the
paginator can just return empty results if the end is near.
* use rough estimations for the page-count, perhaps with some security
margin. For example PostgreSQL supports this by using {{EXPLAIN}}, based
on the table statistics.
I want to
* extend the paginator to support both (infinite and estimate)
* provide an option for {{ModelAdmin}} that let's you use the estimation-
paginator.
* or perhaps even support the infinite-paginator, this would also include
interface changes to the pagination.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26451#comment:1>
* stage: Unreviewed => Accepted
Comment:
setting triage to accepted after discussion with Russell Keith-Magee
--
Ticket URL: <https://code.djangoproject.com/ticket/26451#comment:2>
Old description:
> We often have problems with bigger tables and slow {{{count(*)}}}
> performance.
>
> depending on the use-case there are two ways to improve the situation
> * just work without count, if you never show the page-count. Then the
> paginator can just return empty results if the end is near.
> * use rough estimations for the page-count, perhaps with some security
> margin. For example PostgreSQL supports this by using {{EXPLAIN}}, based
> on the table statistics.
>
> I want to
> * extend the paginator to support both (infinite and estimate)
> * provide an option for {{ModelAdmin}} that let's you use the estimation-
> paginator.
> * or perhaps even support the infinite-paginator, this would also include
> interface changes to the pagination.
New description:
We often have problems with bigger tables and slow {{{count(*)}}}
performance.
depending on the use-case there are two ways to improve the situation
* just work without count, if you never show the page-count. Then the
paginator can just return empty results if the end is near.
* use rough estimations for the page-count, perhaps with some security
margin. For example PostgreSQL supports this by using {{{EXPLAIN}}}, based
on the table statistics.
I want to
* extend the paginator to support both (infinite and estimate)
* provide an option for {{{ModelAdmin}}} that let's you use the
estimation-paginator.
* or perhaps even support the infinite-paginator, this would also include
interface changes to the pagination.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26451#comment:3>
Comment (by claudep):
For MySQL, see also http://django-
mysql.readthedocs.org/en/latest/queryset_extensions.html#approximate-
counting
We might create a separate ticket to add the approximate count to the
queryset API.
--
Ticket URL: <https://code.djangoproject.com/ticket/26451#comment:4>
Comment (by syphar):
thanks claudep for the mysql link, codingjoe and me had the same idea
about adding this to the db-backends and queryset, and then (optionally)
using it for the paginator
--
Ticket URL: <https://code.djangoproject.com/ticket/26451#comment:5>
* status: new => closed
* resolution: => wontfix
Comment:
will create a 3rd party library for this
--
Ticket URL: <https://code.djangoproject.com/ticket/26451#comment:6>