Skip to content

Instantly share code, notes, and snippets.

@mdcallag
Created January 28, 2024 18:50
Show Gist options
  • Save mdcallag/2fcd0ce762592420e8e49fe1dfd5696f to your computer and use it in GitHub Desktop.
Save mdcallag/2fcd0ce762592420e8e49fe1dfd5696f to your computer and use it in GitHub Desktop.
13.13
ib=# explain analyze delete from pi1 where(transactionid>=10885701 and transactionid<10885751);
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------
Delete on pi1 (cost=0.57..8.59 rows=1 width=6) (actual time=0.018..0.018 rows=0 loops=1)
-> Index Scan using pi1_pkey on pi1 (cost=0.57..8.59 rows=1 width=6) (actual time=0.016..0.017 rows=0 loops=1)
Index Cond: ((transactionid >= 10885701) AND (transactionid < 10885751))
Planning Time: 49.985 ms
Execution Time: 0.051 ms
(5 rows)
ib=# explain analyze delete from pi1 where(transactionid>=10913201 and transactionid<10913251);
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------
Delete on pi1 (cost=0.57..8.59 rows=1 width=6) (actual time=0.050..0.051 rows=0 loops=1)
-> Index Scan using pi1_pkey on pi1 (cost=0.57..8.59 rows=1 width=6) (actual time=0.049..0.050 rows=0 loops=1)
Index Cond: ((transactionid >= 10913201) AND (transactionid < 10913251))
Planning Time: 63.191 ms
Execution Time: 0.080 ms
(5 rows)
14.10
ib=# explain analyze delete from pi1 where(transactionid>=10944751 and transactionid<10944801);
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------
Delete on pi1 (cost=0.57..8.59 rows=0 width=0) (actual time=0.053..0.053 rows=0 loops=1)
-> Index Scan using pi1_pkey on pi1 (cost=0.57..8.59 rows=1 width=6) (actual time=0.052..0.052 rows=0 loops=1)
Index Cond: ((transactionid >= 10944751) AND (transactionid < 10944801))
Planning Time: 100.660 ms
Execution Time: 0.106 ms
(5 rows)
ib=# explain analyze delete from pi1 where(transactionid>=10944751 and transactionid<10944801);
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------
Delete on pi1 (cost=0.57..8.59 rows=0 width=0) (actual time=0.014..0.015 rows=0 loops=1)
-> Index Scan using pi1_pkey on pi1 (cost=0.57..8.59 rows=1 width=6) (actual time=0.013..0.013 rows=0 loops=1)
Index Cond: ((transactionid >= 10944751) AND (transactionid < 10944801))
Planning Time: 67.985 ms
Execution Time: 0.040 ms
(5 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment