add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
100000 rows affected
QUERY PLAN
Aggregate (actual rows=1 loops=1)
  -> Seq Scan on t (actual rows=99056 loops=1)
        Filter: (amount <> trunc(amount, 0))
        Rows Removed by Filter: 944
Planning Time: 0.314 ms
Execution Time: 34.885 ms
QUERY PLAN
Aggregate (actual rows=1 loops=1)
  -> Seq Scan on t (actual rows=99056 loops=1)
        Filter: (amount <> round(amount, 0))
        Rows Removed by Filter: 944
Planning Time: 0.069 ms
Execution Time: 36.095 ms
QUERY PLAN
Aggregate (actual rows=1 loops=1)
  -> Seq Scan on t (actual rows=99056 loops=1)
        Filter: (amount <> ((amount)::integer)::numeric)
        Rows Removed by Filter: 944
Planning Time: 0.051 ms
Execution Time: 41.392 ms
QUERY PLAN
Aggregate (actual rows=1 loops=1)
  -> Seq Scan on t (actual rows=99056 loops=1)
        Filter: (round(amount, 2) <> round(amount, 0))
        Rows Removed by Filter: 944
Planning Time: 0.069 ms
Execution Time: 45.788 ms
QUERY PLAN
Aggregate (actual rows=1 loops=1)
  -> Seq Scan on t (actual rows=99056 loops=1)
        Filter: (amount <> ((amount)::bigint)::numeric)
        Rows Removed by Filter: 944
Planning Time: 0.057 ms
Execution Time: 40.146 ms
QUERY PLAN
Aggregate (actual rows=1 loops=1)
  -> Seq Scan on t (actual rows=99056 loops=1)
        Filter: (amount <> floor(amount))
        Rows Removed by Filter: 944
Planning Time: 0.072 ms
Execution Time: 36.532 ms
QUERY PLAN
Aggregate (actual rows=1 loops=1)
  -> Seq Scan on t (actual rows=99056 loops=1)
        Filter: ((amount - floor(amount)) > 0.00)
        Rows Removed by Filter: 944
Planning Time: 0.080 ms
Execution Time: 47.603 ms