clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2043138 fiddles created (16620 in the last week).

create table foo(a,b,c) as select *, lpad('',20) from (select chr(g) a from generate_series(97,122) g) a cross join (select generate_series(1,100000) b) b order by a; create index foo_btree_covering on foo(a,b); create index foo_btree on foo(a); create index foo_gin on foo using gin(a); create index foo_brin_2 on foo using brin(a) with (pages_per_range=2); create index foo_brin_4 on foo using brin(a) with (pages_per_range=4);
ERROR: could not extend file "pg_tblspc/867353/PG_9.6_201608131/867354/867361": No space left on device HINT: Check free disk space.
 hidden batch(es)


vacuum analyze;
 hidden batch(es)


select relname "name", pg_size_pretty(siz) "size", siz/8192 pages, (select count(*) from foo)*8192/siz "rows/page" from( select relname, pg_relation_size(C.oid) siz from pg_class c join pg_namespace n on n.oid = c.relnamespace where nspname = current_schema ) z;
ERROR: relation "foo" does not exist LINE 1: ...iz) "size", siz/8192 pages, (select count(*) from foo)*8192/... ^
 hidden batch(es)


explain analyze select sum(b) from foo where a='a';
ERROR: relation "foo" does not exist LINE 1: explain analyze select sum(b) from foo where a='a'; ^
 hidden batch(es)


drop index foo_btree_covering;
ERROR: index "foo_btree_covering" does not exist
 hidden batch(es)


explain analyze select sum(b) from foo where a='a';
ERROR: relation "foo" does not exist LINE 1: explain analyze select sum(b) from foo where a='a'; ^
 hidden batch(es)


drop index foo_btree;
ERROR: index "foo_btree" does not exist
 hidden batch(es)


explain analyze select sum(b) from foo where a='a';
ERROR: relation "foo" does not exist LINE 1: explain analyze select sum(b) from foo where a='a'; ^
 hidden batch(es)


drop index foo_brin_4;
ERROR: index "foo_brin_4" does not exist
 hidden batch(es)


explain analyze select sum(b) from foo where a='a';
ERROR: relation "foo" does not exist LINE 1: explain analyze select sum(b) from foo where a='a'; ^
 hidden batch(es)


drop index foo_brin_2;
ERROR: index "foo_brin_2" does not exist
 hidden batch(es)


explain analyze select sum(b) from foo where a='a';
ERROR: relation "foo" does not exist LINE 1: explain analyze select sum(b) from foo where a='a'; ^
 hidden batch(es)