成人无码视频,亚洲精品久久久久av无码,午夜精品久久久久久毛片,亚洲 中文字幕 日韩 无码

資訊專欄INFORMATION COLUMN

postgresql 查看page, index, tuple 詳細信息

stefanieliang / 3610人閱讀

摘要:下面的內容需要理解術語需要用到查詢詳細信息查看所有的含有需要子段的

下面的內容需要理解postgres術語 page, tuple, regclass, relname. sql command 需要用到 pgstattuple,pageinspect extension.

Setup Extension
  create extension pgstatuple
  create extension pageinspect 
  
查詢page, index 詳細信息

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"

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

轉載請注明本文地址:http://m.hztianpu.com/yun/38952.html

相關文章

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

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

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

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

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

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

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

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

    JohnLui 評論0 收藏0

發(fā)表評論

0條評論

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