Created
January 3, 2014 20:24
-
-
Save drsnyder/8245874 to your computer and use it in GitHub Desktop.
EXPLAIN ANALYZE on counters WITH primary key on (count_type, count_id)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test=# explain (analyze, buffers, verbose) update counters set count = count + 1 where count_type = 0 and count_id = 1; | |
QUERY PLAN | |
---------------------------------------------------------------------------------------------------------------- | |
Update on public.counters (cost=0.00..5.03 rows=1 width=18) (actual time=0.036..0.036 rows=0 loops=1) | |
Buffers: shared hit=6 | |
-> Seq Scan on public.counters (cost=0.00..5.03 rows=1 width=18) (actual time=0.020..0.021 rows=1 loops=1) | |
Output: count_type, count_id, (count + 1), ctid | |
Filter: ((counters.count_type = 0) AND (counters.count_id = 1)) | |
Rows Removed by Filter: 4 | |
Buffers: shared hit=5 | |
Total runtime: 0.059 ms | |
(8 rows) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment