Skip to content

Instantly share code, notes, and snippets.

@sheki
Created March 6, 2017 05:57
Show Gist options
  • Select an option

  • Save sheki/68bdee6701fddcdf24f24c0ba3d97d20 to your computer and use it in GitHub Desktop.

Select an option

Save sheki/68bdee6701fddcdf24f24c0ba3d97d20 to your computer and use it in GitHub Desktop.
Postgres Explain output
Aggregate (cost=174102.12..174102.13 rows=1 width=0) (actual time=5506.364..5506.365 rows=1 loops=1)
-> Nested Loop (cost=172835.96..174092.73 rows=3757 width=0) (actual time=5506.355..5506.355 rows=0 loops=1)
-> HashAggregate (cost=172835.54..172849.83 rows=1429 width=4) (actual time=3607.213..3925.629 rows=245353 loops=1)
Group Key: clients_service_offerings.service_offering_id
-> Bitmap Heap Scan on clients_service_offerings (cost=14777.92..172280.98 rows=221823 width=4) (actual time=1042.575..3220.471 rows=245353 loops=1)
Recheck Cond: (client_id = 10350)
Filter: ((service_offering_type)::text = 'Rates::OceanFclOffering'::text)
Rows Removed by Filter: 201256
Heap Blocks: exact=125924
-> Bitmap Index Scan on index_clients_service_offerings_on_client_id (cost=0.00..14722.46 rows=412004 width=0) (actual time=1011.142..1011.142 rows=446609 loops=1)
Index Cond: (client_id = 10350)
-> Index Scan using ocean_fcl_offerings_pkey on ocean_fcl_offerings (cost=0.42..0.86 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=245353)
Index Cond: (id = clients_service_offerings.service_offering_id)
Filter: ((deleted_at IS NULL) AND (activation_time <= '2017-02-13'::date) AND ((expiration_time >= '2017-02-13'::date) OR (expiration_time IS NULL)) AND (carrier_id = 865))
Rows Removed by Filter: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment