成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

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

stefanieliang / 3555人閱讀

摘要:下面的內(nèi)容需要理解術(shù)語需要用到查詢?cè)敿?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)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/38952.html

相關(guān)文章

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

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

    lsxiao 評(píng)論0 收藏0
  • SQLAlchemy in 查詢空列表問題分析

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

    joy968 評(píng)論0 收藏0
  • SQLAlchemy in 查詢空列表問題分析

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

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

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

    leone 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<