您好,登錄后才能下訂單哦!
查詢索引的有效性
select d.tablename,a.relname,(case c.indisvalid when true then '有效' else '無(wú)效' end) isvalid ,c.indkey from pg_class a ,pg_namespace b ,pg_index c ,pg_indexes d where a.relkind = 'i' and a.relname=b.oid and b.nspname='public' and a.oid = c.indexrelid and d.indexname=a.relname order by d.tablename;
表查詢
select * from pg_table where schemaname = 'xxx';
查詢索引或者表的大小
select pg_size_pretty(pg_relaion_size('test'));
統(tǒng)計(jì)表的行數(shù)
select a.relname,a.reltuples::int from pg_class a ,pg_namespace b where a.relnamespace=b.oid and b.nspname='public' and a.relkind='r' order by a.relname;
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。