explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9MxX

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=60,897.20..61,030.02 rows=53,130 width=40) (actual rows= loops=)

  • Sort Key: (count(*)) DESC
2. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=50,288.41..56,727.22 rows=53,130 width=40) (actual rows= loops=)

  • Group Key: ((httpevents.data ->> 'user_agent'::text))
3. 0.000 0.000 ↓ 0.0

Gather Merge (cost=50,288.41..55,841.72 rows=44,276 width=40) (actual rows= loops=)

  • Workers Planned: 2
4. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=49,288.39..49,731.15 rows=22,138 width=40) (actual rows= loops=)

  • Group Key: ((httpevents.data ->> 'user_agent'::text))
5. 0.000 0.000 ↓ 0.0

Sort (cost=49,288.39..49,343.73 rows=22,138 width=32) (actual rows= loops=)

  • Sort Key: ((httpevents.data ->> 'user_agent'::text))
6. 0.000 0.000 ↓ 0.0

Parallel Hash Semi Join (cost=19,233.87..47,690.66 rows=22,138 width=32) (actual rows= loops=)

  • Hash Cond: ((httpevents.data ->> 'user_agent'::text) = (httpevents_1.data ->> 'user_agent'::text))
7. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on httpevents (cost=0.00..13,342.94 rows=44,275 width=832) (actual rows= loops=)

  • Filter: ((data ->> 'user_agent'::text) !~~ ALL ('{%Power%,%2008121711%,"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.43 Safari/530.5","Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 (.NET CLR 3.5.30729)","Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30","Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9b3) Gecko/2008020514 Opera 9.5","Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2b5) Gecko/20091204 Firefox/3.6b5","Mozilla/5.0 (Windows; U; Windows NT 6.0; ru-RU) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16","Mozilla/5.0 (Windows; U; Windows NT 5.2; sk; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15"}'::text[]))
8. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=13,859.70..13,859.70 rows=45,934 width=832) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on httpevents httpevents_1 (cost=0.00..13,859.70 rows=45,934 width=832) (actual rows= loops=)

  • Filter: (((data ->> 'user_agent'::text) ~~ ANY ('{%:;%,%perl%,%ruby%,%''%,%()%}'::text[])) OR ((data ->> 'uri'::text) ~~ ANY ('{%ruby%,%''%,%()%,%script>%,%pass%}'::text[])) OR ((data ->> 'username'::text) ~~ ANY ('{%''%}'::text[])) OR ((data ->> 'host'::text) ~~ ANY ('{%<%}'::text[])))