亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

postgresql 查看page, index, tuple 詳細(xì)信息

stefanieliang / 3627人閱讀

摘要:下面的內(nèi)容需要理解術(shù)語需要用到查詢詳細(xì)信息查看所有的含有需要子段的

下面的內(nèi)容需要理解postgres術(shù)語 page, tuple, regclass, relname. sql command 需要用到 pgstattuple,pageinspect extension.

Setup Extension
  create extension pgstatuple
  create extension pageinspect 
  
查詢page, index 詳細(xì)信息

show how many pages in one table
select pg_relpages(regclass)

show one table tuple information
select * from pgstattuple(regclass)

show one table index information
select * from pgstatindex(regclass)

show one page information
select * from page_header(get_raw_page(relname text, "main", page number))

show one page all tuples information
select * from heap_page_items(get_raw_page(relname text, "main", page number))

show one index information
select * from bt_metap(relname text);

show one index page information
select * from bt_page_stats(relname text, page number)

show one index page all tuples information
select * from bt_page_items(relname text, page number)

查看database 所有的含有需要toast子段的table
select t1.relid, t1.schemaname, t1.relname, t2.relid, t2.schemaname, t2.relname from pg_stat_all_tables t1 inner join pg_stat_all_tables t2 on "pg_toast_"|| t1.relid = t2.relname and t1.schemaname = "public"

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://www.ezyhdfw.cn/yun/38952.html

相關(guān)文章

  • SQLAlchemy in 查詢空列表問題分析

    摘要:收集有關(guān)數(shù)據(jù)庫中表的內(nèi)容的統(tǒng)計信息。預(yù)計的該規(guī)劃節(jié)點的行平均寬度單位字節(jié)。其中上層節(jié)點的開銷將包括其所有子節(jié)點的開銷。一般而言,頂層的行預(yù)計數(shù)量會更接近于查詢實際返回的行數(shù)。 問題場景 有model Account,SQLAlchemy 查詢語句如下: query = Account.query.filter(Account.id.in_(account_ids)).order_by(...

    lsxiao 評論0 收藏0
  • SQLAlchemy in 查詢空列表問題分析

    摘要:收集有關(guān)數(shù)據(jù)庫中表的內(nèi)容的統(tǒng)計信息。預(yù)計的該規(guī)劃節(jié)點的行平均寬度單位字節(jié)。其中上層節(jié)點的開銷將包括其所有子節(jié)點的開銷。一般而言,頂層的行預(yù)計數(shù)量會更接近于查詢實際返回的行數(shù)。 問題場景 有model Account,SQLAlchemy 查詢語句如下: query = Account.query.filter(Account.id.in_(account_ids)).order_by(...

    joy968 評論0 收藏0
  • SQLAlchemy in 查詢空列表問題分析

    摘要:收集有關(guān)數(shù)據(jù)庫中表的內(nèi)容的統(tǒng)計信息。預(yù)計的該規(guī)劃節(jié)點的行平均寬度單位字節(jié)。其中上層節(jié)點的開銷將包括其所有子節(jié)點的開銷。一般而言,頂層的行預(yù)計數(shù)量會更接近于查詢實際返回的行數(shù)。 問題場景 有model Account,SQLAlchemy 查詢語句如下: query = Account.query.filter(Account.id.in_(account_ids)).order_by(...

    mating 評論0 收藏0
  • 深入解析 PostgreSQL 系列之并發(fā)控制與事務(wù)機(jī)制

    摘要:深入解析系列之并發(fā)控制與事務(wù)機(jī)制并發(fā)控制旨在針對數(shù)據(jù)庫中對事務(wù)并行的場景,保證中的一致性與隔離。啟動并執(zhí)行第一個命令。事務(wù)管理器分配,并返回事務(wù)快照,因為正在進(jìn)行中。意味著該行由另一個并發(fā)事務(wù)更新,并且其事務(wù)尚未終止。 showImg(https://segmentfault.com/img/remote/1460000018081793); 深入解析 PostgreSQL 系列整理...

    JohnLui 評論0 收藏0

發(fā)表評論

0條評論

最新活動
閱讀需要支付1元查看
<