explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Idl

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 67.473 4,544.311 ↑ 1.0 1 1

Aggregate (cost=90,951.96..90,951.97 rows=1 width=4) (actual time=4,544.310..4,544.311 rows=1 loops=1)

2. 3,695.848 4,476.838 ↓ 10.4 241,204 1

Hash Join (cost=35,912.91..90,893.96 rows=23,201 width=4) (actual time=265.672..4,476.838 rows=241,204 loops=1)

  • Hash Cond: (ee.system_email_id = se.id)
3. 515.935 515.935 ↓ 1.0 1,083,868 1

Seq Scan on email_events ee (cost=0.00..39,913.16 rows=1,078,973 width=8) (actual time=0.011..515.935 rows=1,083,868 loops=1)

  • Filter: (management_company_id = 2161)
4. 29.682 265.055 ↓ 9.3 90,126 1

Hash (cost=35,791.71..35,791.71 rows=9,696 width=12) (actual time=265.055..265.055 rows=90,126 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3873kB
5. 208.532 235.373 ↓ 9.3 90,126 1

Bitmap Heap Scan on system_emails se (cost=5,329.94..35,791.71 rows=9,696 width=12) (actual time=27.570..235.373 rows=90,126 loops=1)

  • Recheck Cond: ((scheduled_email_id = ANY ('{4074,4116,4100,4113,4119,4066,4091,4111,3979,4030,4041,4026,4025,4158,3724,4011,4007,4010,4008,4013,4019,4020,4009,4046,4006,4015,4033,4031,4038,4037,4044,4051,4053,4060,4059,4064,4061,4070,4065,4069,4077,4076,4078,4079,4080,4086,4090,4106,4093,4096,4112,4123,4087,4101,4124,4117,4126,4168,4174,4170,4166,4159,4161,4164,4182,4127,4125,4122,4169,4167,4160,4163,4165,4173}'::integer[])) AND (sent_on >= '2012-07-01 00:00:00-06'::timestamp with time zone) AND (sent_on <= '2012-08-14 00:00:00-06'::timestamp with time zone))
  • Filter: ((customer_id IS NOT NULL) AND (management_company_id = 2161) AND (property_id = ANY ('{23061,23210,23053,23188,23148,23190,23168,22815,22806,22774,23159,22971,23153,23133,23179,23158,22885,23162,23169,23246,23177,22887,23218,23196,23214,23209,23122,23197,23208,23182,23136,23175,29188,23060,23161,23174,22828,23202,23124,23204,23164,23194,23200,23130,23608,23052,23189,23167,23187,23125,23170,22976,23341,23173,23238,23203,23205,23263,22892,23227,38851,23156,23068,23217,23166,23221,23236,23237,23211,23181,23163,23178,23180,23234,23121,23248,23192,23165,23215,23171,23193,23219,23222,23251,23244,23191,23233,23216,23220,23610,23185,23059,23172,23223,32756,23230,23232,23199,23225,32757,23258,23240,23235,23260,23250,23186,22987,23201,23176,23207,23228,23231,23262,23157,23127,23257,23183,23239,23241,23243,23058,23206,23195,23198,23224,23261,23229,23247,23064,23226,23249,23252,23609,23255,23051,22769,26059,22818,29187,33106,23611,22876,22779,22878,22770,22772,22782,36213,39389,29186,22780,22783,22821,22874,22795,22830,22790,34790,37962,22834,22798,22877,30204,22799,22802,22875,22881,22784,22822,38861,22883,22771,22884,22804,22805,22889,23048,23057,23063,23056,22896,22820,22819,22794,22786,22837,22900,22879,22796,22808,22810,22905,22841,25264,23152,23154,23155,23132,22973,22886,22776,23128,22882,22890,22838,23150,22777,22844,22899,22974,22894,34815,22826,22787,22902,22839,22977,22979,22800,38854,22898,22969,22812,22778,22775,22972,23149,22835,38853,29189,33771,23242,23184,23126,22897,22840,22803,22814,22789,22880,22888,22831,22901,23050,23055,23066,23259,23253,23151,22486,23213,22895,22891,40980,22970,22833,22825,23062,23212,23643,22823,23245,22793,43934,23049,22792,22824,23129,23131,22801,22893,22809,22791,22797,22781,22785,23256,38852,22773,22904,22843,23025,22816,22903,22975,22788,22829,22807,22811}'::integer[])))
6. 0.619 26.841 ↓ 0.0 0 1

BitmapAnd (cost=5,329.94..5,329.94 rows=24,653 width=0) (actual time=26.841..26.841 rows=0 loops=1)

7. 8.630 8.630 ↓ 1.1 90,278 1

Bitmap Index Scan on idx_system_emails_scheduled_email_id (cost=0.00..1,728.25 rows=82,843 width=0) (actual time=8.630..8.630 rows=90,278 loops=1)

  • Index Cond: (scheduled_email_id = ANY ('{4074,4116,4100,4113,4119,4066,4091,4111,3979,4030,4041,4026,4025,4158,3724,4011,4007,4010,4008,4013,4019,4020,4009,4046,4006,4015,4033,4031,4038,4037,4044,4051,4053,4060,4059,4064,4061,4070,4065,4069,4077,4076,4078,4079,4080,4086,4090,4106,4093,4096,4112,4123,4087,4101,4124,4117,4126,4168,4174,4170,4166,4159,4161,4164,4182,4127,4125,4122,4169,4167,4160,4163,4165,4173}'::integer[]))
8. 17.592 17.592 ↑ 1.0 168,940 1

Bitmap Index Scan on idx_system_emails_sent_on (cost=0.00..3,596.58 rows=171,227 width=0) (actual time=17.592..17.592 rows=168,940 loops=1)

  • Index Cond: ((sent_on >= '2012-07-01 00:00:00-06'::timestamp with time zone) AND (sent_on <= '2012-08-14 00:00:00-06'::timestamp with time zone))