Database Reference
In-Depth Information
Tuple statistics - pgstattuple
A tuple is a set of objects that share the same characteristics or have the same property. The
pgstattuple extension provides a set of functions for statistics on the tuple level.
In the official Heroku documentation, it is informed that this extension is available for use,
but many developers fail to use it. This extension needs a superuser level and Heroku does
not provide it. For example:
$ heroku pg:psql --app your-app-name
CREATE EXTENSION pgstattuple;
CREATE TABLE jobs (id integer, name text);
INSERT INTO jobs (id, name) VALUES (1, 'Load users');
INSERT INTO jobs (id, name) VALUES (2, 'Send emails');
SELECT * FROM pgstattuple('jobs');
ERROR: must be superuser to use pgstattuple functions
You can find more information about using this extension in your local environment at ht-
tp://www.postgresql.org/docs/current/static/pgstattuple.html .
Search WWH ::




Custom Search