My general understanding is that a tuple is a row. However, I'm using the Postgres dev plan in Heroku. It has a limit of 10,000 rows. I have over 100,000 entries for n_live_tup
. How can this be?
A table has rows and columns, where rows represents records and columns represent the attributes. Tuple − A single row of a table, which contains a single record for that relation is called a tuple. Relation instance − A finite set of tuples in the relational database system represents relation instance.
A tuple is PostgreSQL's internal representation of a row in a table. A single row may have many tuples representing it, but only one of these tuples will be applicable at any single point in time.
Introduction to the PostgreSQL ROW_NUMBER() function The ROW_NUMBER() function is a window function that assigns a sequential integer to each row in a result set. The following illustrates the syntax of the ROW_NUMBER() function: ROW_NUMBER() OVER( [PARTITION BY column_1, column_2,…] [ORDER BY column_3,column_4,…] )
In the context of a relational database, a row—also called a tuple—represents a single, implicitly structured data item in a table. In simple terms, a database table can be thought of as consisting of rows and columns. A tuple is a finite sequence of attributes, which are ordered pairs of domains and values.
"Tuple" is the abstract term, "row" is for the concrete implementation.
Just like "relation" versus "table".
Otherwise the terms are often used meaning the same. You can find more for each of them in Wikipedia.
No idea what's behind the Heroku policies. But the numbers for n_live_tup
in pg_stat_user_tables
or pgstattuple
represents the number of live rows in your table.
See:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With