{ "info": { "author": "Stephen McDonald", "author_email": "stephen.mc@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Site Management" ], "description": "Created by `Stephen McDonald `_\n\nIntroduction\n============\n\nUp until PostgreSQL 9.2, ``COUNT`` queries generally required scanning\nevery row in a database table. With millions of rows, this can become\nquite slow. One work-around for this is to query statistics in\nPostgreSQL for an approximate row count, which in many cases is an\nacceptable trade-off.\n\nGiven a table called ``bigdata``, the following query will return an\napproximate row count::\n\n SELECT reltuples FROM pg_class WHERE relname = 'bigdata';\n\nYou can read more information about `slow COUNT queries in PostgreSQL`_\nin the PostgreSQL wiki.\n\nWhat ``django-postgres-fuzzycount`` provides is a way of using this\napproach directly in your Django model managers. It was originally\nbuilt for displaying statistics in the `kouio RSS reader`_, a popular alternative to Google Reader, that acquired over 5 million news articles\nin its database during the first week of its launch.\n\nInstallation\n============\n\nThe easiest way to install ``django-postgres-fuzzycount`` is directly\nfrom PyPi using `pip`_ by running the following command::\n\n $ pip install -U django-postgres-fuzzycount\n\nOtherwise you can download and install it directly from source::\n\n $ python setup.py install\n\nUsage\n=====\n\nBy using the ``fuzzycount.FuzzyCountManager`` on your Django models,\nits ``count()`` method will return an approximate value when querying\nPostgreSQL tables without any ``WHERE`` OR ``HAVING`` clauses::\n\n from django.db import models\n from fuzzycount import FuzzyCountManager\n\n class BigData(models.Model):\n\n big = models.BooleanField(default=True)\n data = models.TextField()\n\n objects = FuzzyCountManager()\n\n BigData.objects.count() # Uses fuzzycount\n BigData.objects.filter(id__gt=9000).count() # Doesn't use fuzzycount\n\nThe ``fuzzycount.FuzzyCountManager`` also checks the database engine\nbeing used, and only applies the approximate count query when using\nPostgreSQL, so other database backends can be used and will behave as\nusual (for varying definitions of `usual`, depending on the database :-).\n\nInspiration\n===========\n\n * `postgres_loose_table_counts`_, a Ruby gem providing the same\n approach for Rails\n * This `Django snippet`_, which bakes the approach into the admin\n\n.. _`slow COUNT queries in PostgreSQL`: http://wiki.postgresql.org/wiki/Slow_Counting\n.. _`kouio RSS reader`: https://kouio.com\n.. _`pip`: http://www.pip-installer.org/\n.. _`postgres_loose_table_counts`: https://github.com/goodfilms/postgres_loose_table_counts\n.. _`Django snippet`: http://djangosnippets.org/snippets/2855/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/stephenmcd/django-postgres-fuzzycount", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-postgres-fuzzycount", "package_url": "https://pypi.org/project/django-postgres-fuzzycount/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-postgres-fuzzycount/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/stephenmcd/django-postgres-fuzzycount" }, "release_url": "https://pypi.org/project/django-postgres-fuzzycount/0.1.7/", "requires_dist": null, "requires_python": null, "summary": "A Django model manager providing fast / fuzzy counts for PostgreSQL database tables.", "version": "0.1.7" }, "last_serial": 2332559, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f18881a96bf8d64e2a9736808e1e42ff", "sha256": "8bd792a15c2a6c02dec7caa22e2acec771bffcd7ef0300706189a25c73b2d846" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f18881a96bf8d64e2a9736808e1e42ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3321, "upload_time": "2013-07-07T02:10:47", "url": "https://files.pythonhosted.org/packages/86/7b/2b90726aa237f49e4ffd7a5fad619bbdc3c9d2d94e93e5cc0065ea03be1d/django-postgres-fuzzycount-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "69a0f6b0c1c402153e018a1cceffaaca", "sha256": "f69eb221709dd2eab85aaf1622167afae9abae16396bd21695da8512a4b47249" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.1.tar.gz", "has_sig": false, "md5_digest": "69a0f6b0c1c402153e018a1cceffaaca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3467, "upload_time": "2013-07-07T03:43:31", "url": "https://files.pythonhosted.org/packages/9d/ae/ef383d5b91b20fd18d9530e642880fc7258121b46697316f228f6904babc/django-postgres-fuzzycount-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7f3a2954d1f59fcfb197f8dffa78ffca", "sha256": "37a214b2c1121aa9876d869c032cdee32c1f105958c564d53f7805b5ca6063c5" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7f3a2954d1f59fcfb197f8dffa78ffca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3775, "upload_time": "2013-07-07T04:09:02", "url": "https://files.pythonhosted.org/packages/c3/21/2db728836466a34b18c15efc256c13eb1b28c3c9ef4f546ea588cf7436de/django-postgres-fuzzycount-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7576c31f1d53b652b520c251ec1c545a", "sha256": "1c997461670ffad4ba4c2ffd73551126b301f90de2bffd001d3c8efa1ad533c9" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7576c31f1d53b652b520c251ec1c545a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3828, "upload_time": "2013-07-14T08:16:08", "url": "https://files.pythonhosted.org/packages/ee/3f/9938a861132d032305e59cfc3eb16e35d0ba5c5aa87413b3fb2fb417705d/django-postgres-fuzzycount-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "6e2ba9b8fba84204b982fabb113b2303", "sha256": "ab1036fef446acc09a63cf99ba0f669bdb4f56872269d1906339ac3ae0104130" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.4.tar.gz", "has_sig": false, "md5_digest": "6e2ba9b8fba84204b982fabb113b2303", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3831, "upload_time": "2013-07-14T21:43:55", "url": "https://files.pythonhosted.org/packages/0d/e5/83f7f6ea4e5514041cf700db075f781511127c40aec3a54a5f89eaffddf5/django-postgres-fuzzycount-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "76df4789008f099121ebe090f6c4a865", "sha256": "7dc7d22c13d64e68bf3e2edd12661b2aa3bbcbeaeb56af946f8640385dc38eac" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.5.tar.gz", "has_sig": false, "md5_digest": "76df4789008f099121ebe090f6c4a865", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3808, "upload_time": "2013-10-31T19:39:48", "url": "https://files.pythonhosted.org/packages/7e/63/770e39f9d863e066a63149a8d0d337ce9f1ef8e63b7f0500b364895a8075/django-postgres-fuzzycount-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "83d7ece6123fe17bbc4a285e8b7e7968", "sha256": "4d562922adbdce08eaa7d3280a10997a1f993e521e60370fdf3d5273ea299a56" }, "downloads": -1, "filename": "django_postgres_fuzzycount-0.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "83d7ece6123fe17bbc4a285e8b7e7968", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5500, "upload_time": "2014-01-21T20:42:48", "url": "https://files.pythonhosted.org/packages/2b/b4/701f53a567e6421a7711fe67458618c6b2d6c2daf28aee342aa1a5f2c209/django_postgres_fuzzycount-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ab5264e676847ca18bb2e176cd20fe7", "sha256": "1f1df13f916e3cfc2038fd7f093f8d709ca99ca1c133f56014e7a0151a6f2288" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.6.tar.gz", "has_sig": false, "md5_digest": "4ab5264e676847ca18bb2e176cd20fe7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3871, "upload_time": "2014-01-21T20:42:44", "url": "https://files.pythonhosted.org/packages/c0/70/2778fb89212bae4eac8fb4270700b7ab5b09f47d55eb3ac7c061796f25c3/django-postgres-fuzzycount-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "e164cebe7f6c364075a5aac65359153b", "sha256": "aba4d96f31f57d2a5a50804e4ea6c3bca56ca6e255fe9515965134eae9b786a0" }, "downloads": -1, "filename": "django_postgres_fuzzycount-0.1.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e164cebe7f6c364075a5aac65359153b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5663, "upload_time": "2016-09-09T00:03:06", "url": "https://files.pythonhosted.org/packages/ac/e4/65a109c081146b53436fcc333800fafbaf5a2b7361baa13b618a5a1d3971/django_postgres_fuzzycount-0.1.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8fe868fed15e34819951c4e729ee78cf", "sha256": "b9e2c431d013a73965d76a369086f3f8bc97d0774dff635b9881470d88aff821" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.7.tar.gz", "has_sig": false, "md5_digest": "8fe868fed15e34819951c4e729ee78cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4011, "upload_time": "2016-09-09T00:03:01", "url": "https://files.pythonhosted.org/packages/7d/c1/93d41c0d9265094d58644b4287597e866885c9ecf021f5bc92aab26b8e64/django-postgres-fuzzycount-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e164cebe7f6c364075a5aac65359153b", "sha256": "aba4d96f31f57d2a5a50804e4ea6c3bca56ca6e255fe9515965134eae9b786a0" }, "downloads": -1, "filename": "django_postgres_fuzzycount-0.1.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e164cebe7f6c364075a5aac65359153b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5663, "upload_time": "2016-09-09T00:03:06", "url": "https://files.pythonhosted.org/packages/ac/e4/65a109c081146b53436fcc333800fafbaf5a2b7361baa13b618a5a1d3971/django_postgres_fuzzycount-0.1.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8fe868fed15e34819951c4e729ee78cf", "sha256": "b9e2c431d013a73965d76a369086f3f8bc97d0774dff635b9881470d88aff821" }, "downloads": -1, "filename": "django-postgres-fuzzycount-0.1.7.tar.gz", "has_sig": false, "md5_digest": "8fe868fed15e34819951c4e729ee78cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4011, "upload_time": "2016-09-09T00:03:01", "url": "https://files.pythonhosted.org/packages/7d/c1/93d41c0d9265094d58644b4287597e866885c9ecf021f5bc92aab26b8e64/django-postgres-fuzzycount-0.1.7.tar.gz" } ] }