add remove split language show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
setseed
SELECT 1
SELECT 300000
id product cost
551 Bow 705.9
896 Sofa 31.9
635 Mouse Pad 213.6
543 Lamp Shade 623.0
954 Scotch Tape 603.9
797 Scotch Tape 336.7
SELECT 6
VACUUM
column_name sample
id {866,77,760,812,419}
product {"Rubber Band",Bread,Twister,"Model Car",Knife}
cost {430.0,960.5,474.8,575.3,705.8}
SELECT 3
QUERY PLAN
Subquery Scan on pg_stats (cost=4.85..23.31 rows=1 width=96) (actual time=0.047..0.071 rows=3 loops=1)
  -> Nested Loop (cost=4.85..23.29 rows=1 width=401) (actual time=0.038..0.053 rows=3 loops=1)
        Join Filter: (has_column_privilege(c.oid, a.attnum, 'select'::text) AND (c.oid = a.attrelid))
        -> Nested Loop (cost=4.57..21.76 rows=2 width=180) (actual time=0.027..0.032 rows=3 loops=1)
              -> Index Scan using pg_class_relname_nsp_index on pg_class c (cost=0.27..8.29 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=1)
                    Index Cond: (relname = 'tbl'::name)
                    Filter: ((NOT relrowsecurity) OR (NOT row_security_active(oid)))
              -> Bitmap Heap Scan on pg_statistic s (cost=4.30..13.44 rows=3 width=176) (actual time=0.010..0.013 rows=3 loops=1)
                    Recheck Cond: (starelid = c.oid)
                    Heap Blocks: exact=2
                    -> Bitmap Index Scan on pg_statistic_relid_att_inh_index (cost=0.00..4.30 rows=3 width=0) (actual time=0.006..0.006 rows=3 loops=1)
                          Index Cond: (starelid = c.oid)
        -> Index Scan using pg_attribute_relid_attnum_index on pg_attribute a (cost=0.28..0.74 rows=1 width=70) (actual time=0.003..0.003 rows=1 loops=3)
              Index Cond: ((attrelid = s.starelid) AND (attnum = s.staattnum))
              Filter: (NOT attisdropped)
Planning Time: 0.773 ms
Execution Time: 0.127 ms
EXPLAIN