explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ik88

Settings
# exclusive inclusive rows x rows loops node
1. 162.048 6,754.854 ↓ 1.3 2,411 1

SELECT "dispatch_order"."id", "dispatch_order"."created", "dispatch_order"."updated", "dispatch_order"."city_id", "dispatch_order"."must_start_before", "dispatch_order"."accepted", "dispatch_order"."started", "dispatch_order"."dropped", "dispatch_order"."finished", "dispatch_order"."finished_by_id", "dispatch_order"."finished_notes", "dispatch_order"."package_type", "dispatch_order"."transport_type", "dispatch_order"."status", "dispatch_order"."tracking_key", "dispatch_order"."original_eta", "dispatch_order"."real_completion_time", "dispatch_order"."notes", "dispatch_order"."driver_id", "dispatch_order"."shop_id", "dispatch_order"."path_suggested_gencoded", "dispatch_order"."distance", "dispatch_order"."customer_id", "dispatch_order"."company_id", "dispatch_order"."from_inquiry_id", "dispatch_order"."itinerary_id", "dispatch_order"."payment_method_id", "dispatch_order"."total_time", "dispatch_order"."can_bundle", "dispatch_order"."product", "dispatch_order"."product_version", "dispatch_order"."conf_id", "dispatch_order"."crm_integrated_at" FROM "dispatch_order" WHERE ("dispatch_order"."city_id" = 9 AND "dispatch_order"."created" >= 2020-03-01 00:00:00 AND "dispatch_order"."created" <= 2020-03-19 23:59:59)***Bitmap Heap Scan on dispatch_order (cost=19,765.92..22,548.54 rows=1,851 width=770) (actual time=6,595.351..6,754.854 rows=2,411 loops=1)

  • Recheck Cond: ((city_id = 9) AND (created >= '2020-03-01 00:00:00'::timestamp without time zone) AND (created <= '2020-03-19 23:59:59'::timestamp without time zone))
  • Rows Removed by Index Recheck: 8128
  • Heap Blocks: exact=11029
2. 30.401 6,592.806 ↓ 0.0 0 1

BitmapAnd (cost=19,765.92..19,765.92 rows=1,851 width=0) (actual time=6,592.806..6,592.806 rows=0 loops=1)

3. 6,167.377 6,167.377 ↓ 1.1 111,518 1

Bitmap Index Scan on dispatch_order_city_id (cost=0.00..4,223.95 rows=104,519 width=0) (actual time=6,167.377..6,167.377 rows=111,518 loops=1)

  • Index Cond: (city_id = 9)
4. 395.028 395.028 ↓ 1.5 572,904 1

Bitmap Index Scan on dispatch_order_created (cost=0.00..15,540.79 rows=390,473 width=0) (actual time=395.028..395.028 rows=572,904 loops=1)

  • Index Cond: ((created >= '2020-03-01 00:00:00'::timestamp without time zone) AND (created <= '2020-03-19 23:59:59'::timestamp without time zone))
Planning time : 3.270 ms
Execution time : 6,755.762 ms