postgresql Postgres 中的元组和行有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19799282/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What's the difference between a tuple and a row in Postgres?
提问by Bailey Smith
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,000rows. I have over 100,000entries for n_live_tup
. How can this be?
我的一般理解是元组是一行。但是,我在 Heroku 中使用 Postgres 开发计划。它有10,000行的限制。我有超过100,000个条目用于n_live_tup
. 怎么会这样?
回答by Erwin Brandstetter
Tuple
is the abstract term, row
is for the concrete implementation.
Just like relation
versus table
.
Tuple
是抽象术语,row
是针对具体实现的。
就像relation
对table
。
Otherwise the terms are often used meaning the same. You can find more in Wikipedia for each of them.
否则,这些术语通常具有相同的含义。您可以在维基百科中找到更多关于它们的信息。
No idea what's behind the Heroku policies. But the numbers for n_live_tup
in pg_stat_user_tables
or pgstattuple
mean you have that many live rowsin your table.
More about n_live_tup
under this related question on dba.SE.
不知道 Heroku 政策背后的原因。但是n_live_tup
inpg_stat_user_tables
或in的数字pgstattuple
意味着您的表中有许多活动行。
更多关于n_live_tup
dba.SE 的相关问题。