explain analyse
SELECT COUNT(*) FROM syo_event WHERE id_group = 'OPPORTUNITY' AND id_type = 'NEW'
Meine Abfrage diesen Plan hat:versteht Postgres
Aggregate (cost=654.16..654.17 rows=1 width=0) (actual time=3.783..3.783 rows=1 loops=1)
-> Bitmap Heap Scan on syo_event (cost=428.76..654.01 rows=58 width=0) (actual time=2.774..3.686 rows=1703 loops=1)
Recheck Cond: ((id_group = 'OPPORTUNITY'::text) AND (id_type = 'NEW'::text))
-> BitmapAnd (cost=428.76..428.76 rows=58 width=0) (actual time=2.635..2.635 rows=0 loops=1)
-> Bitmap Index Scan on syo_list_group (cost=0.00..35.03 rows=1429 width=0) (actual time=0.261..0.261 rows=2187 loops=1)
Index Cond: (id_group = 'OPPORTUNITY'::text)
-> Bitmap Index Scan on syo_list_type (cost=0.00..393.45 rows=17752 width=0) (actual time=2.177..2.177 rows=17555 loops=1)
Index Cond: (id_type = 'NEW'::text)
Total runtime: 3.827 ms
In der ersten Zeile:
(actual time=3.783..3.783 rows=1 loops=1
(Warum die aktuelle Zeit nicht mit der letzten Zeile passen, Total runtime
?)
In der zweiten Zeile:
cost=428.76..654.01
(Starten Sie die Bitmap Heap Scan
mit Kosten 428,76 und endet mit 654,01)?
rows=58 width=0)
(Wath ist rows
und width
, alles wichtig?)
rows=1703
(dies ist das Ergebnis)
loops=1)
(Used in Subqueries?)