Skip to content

Instantly share code, notes, and snippets.

@grigio
Created August 6, 2012 16:21
Show Gist options
  • Save grigio/3276129 to your computer and use it in GitHub Desktop.
Save grigio/3276129 to your computer and use it in GitHub Desktop.
How does the 14000 rows limitation work on heroku?
➜ myapp git:(master) heroku pg:psql
psql (9.1.3, server 9.1.4)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
d7342gd34r=>
d7342gd34r=> select count(*) from coords;
count
--------
188980
(1 row)
d7342gd34r=> select (id, desc
d7342gd34r=> select (id, description) from coords order by id desc limit 5;
row
----------------------------
(1916640,test)
(1916639,test)
(190000,"article #190000")
(189999,"article #189999")
(189998,"article #189998")
(5 rows)
@will
Copy link

will commented Aug 6, 2012

SELECT sum(reltuples) from pg_class where relname IN (c.relname FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'r'nformation_schema' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema'd)); AND n.nspname !~ '^pg_toast' AND pg_catalog.pg_table_is_visible(c.oid));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment