Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. QUERY PLAN
  2. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  3. Unique (cost=39795.56..39796.87 rows=261 width=4) (actual time=563.203..563.298 rows=167 loops=1)
  4. -> Sort (cost=39795.56..39796.22 rows=261 width=4) (actual time=563.200..563.235 rows=174 loops=1)
  5. Sort Key: c.id DESC
  6. Sort Method: quicksort Memory: 33kB
  7. -> Nested Loop (cost=30795.57..39785.09 rows=261 width=4) (actual time=425.001..562.961 rows=174 loops=1)
  8. -> Nested Loop (cost=30795.14..38660.20 rows=631 width=8) (actual time=424.969..560.135 rows=322 loops=1)
  9. -> Hash Join (cost=30794.71..37656.70 rows=1992 width=12) (actual time=424.903..556.980 rows=349 loops=1)
  10. Hash Cond: (cu.company_id = companies.id)
  11. -> Seq Scan on company_users cu (cost=0.00..6210.90 rows=168311 width=8) (actual time=0.017..93.786 rows=168340 loops=1)
  12. Filter: (role = 'owner'::company_user_roles)
  13. Rows Removed by Filter: 114718
  14. -> Hash (cost=30548.26..30548.26 rows=19716 width=4) (actual time=424.637..424.637 rows=16640 loops=1)
  15. Buckets: 32768 Batches: 1 Memory Usage: 841kB
  16. -> Bitmap Heap Scan on companies (cost=264.93..30548.26 rows=19716 width=4) (actual time=62.851..409.732 rows=16640 loops=1)
  17. Recheck Cond: (main_region_id = ANY ('{151,104,391,168,424}'::integer[]))
  18. Heap Blocks: exact=6663
  19. -> Bitmap Index Scan on index_companies_on_main_region_id_new (cost=0.00..260.00 rows=19716 width=0) (actual time=60.440..60.440 rows=16640 loops=1)
  20. Index Cond: (main_region_id = ANY ('{151,104,391,168,424}'::integer[]))
  21. -> Index Only Scan using index_for_deliveries_on_users_email on users u (cost=0.43..0.49 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=349)
  22. Index Cond: (id = cu.user_id)
  23. Heap Fetches: 263
  24. -> Index Scan using ipart_companies_id_state_not_deleted on companies c (cost=0.43..1.77 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=322)
  25. Index Cond: (id = cu.company_id)
  26. Filter: ((NOT COALESCE(tmp, false)) AND ((state)::text <> ALL ('{deleted,rejected}'::text[])))
  27. Rows Removed by Filter: 0
  28. Planning time: 31.532 ms
  29. Execution time: 563.640 ms
  30. (27 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement