explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mCvo

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 105,937.438 ↑ 1.0 1 1

Limit (cost=1,042,058,575.57..1,042,058,575.58 rows=1 width=8) (actual time=105,937.435..105,937.438 rows=1 loops=1)

2. 15.591 105,937.434 ↑ 1.0 1 1

Aggregate (cost=1,042,058,575.57..1,042,058,575.58 rows=1 width=8) (actual time=105,937.434..105,937.434 rows=1 loops=1)

3. 22.381 105,921.843 ↓ 4,036.4 181,640 1

Nested Loop (cost=0.44..1,042,058,575.46 rows=45 width=0) (actual time=0.276..105,921.843 rows=181,640 loops=1)

4. 490.422 490.422 ↑ 1.0 598,915 1

Seq Scan on profiles (cost=0.00..100,682.29 rows=599,091 width=4) (actual time=0.013..490.422 rows=598,915 loops=1)

  • Filter: (community_id = 4)
  • Rows Removed by Filter: 5082
5. 0.000 105,409.040 ↓ 0.0 0 598,915

Subquery Scan on ex1 (cost=0.44..1,739.22 rows=1 width=4) (actual time=0.176..0.176 rows=0 loops=598,915)

  • Filter: (profiles.member_id = ex1.pos_transaction_member_id)
6. 1,197.830 105,409.040 ↓ 0.0 0 598,915

GroupAggregate (cost=0.44..1,738.66 rows=45 width=4) (actual time=0.176..0.176 rows=0 loops=598,915)

  • Group Key: pos_transactions.member_id
  • Filter: (sum(pos_transactions.amount) >= '0'::numeric)
7. 104,211.210 104,211.210 ↑ 17.0 8 598,915

Index Scan using pos_transactions_member_id_index on pos_transactions (cost=0.44..1,735.94 rows=136 width=10) (actual time=0.092..0.174 rows=8 loops=598,915)

  • Index Cond: ((member_id IS NOT NULL) AND (profiles.member_id = member_id))
  • Filter: ((store_id)::text = ANY ('{10125,10126,10127,10128,10129,10130,10131,10132,10133,10134,10135,10136,10137,10138,10139,10140,10141,10142,10143,10144,10145,10146,10147,10148,10149,10150,10151,10152,10153,10154,10155,10156,10157,10158,10159,10160,10161,10162,10163,10164,10165,10166,10167,10168,10169,10170,10171,10172,10173,10174,10175,10176,10177,10178,10179,10180,10181,10182,10183,10184,10185,10186,10187,10188,10189,10190,10191,10192,10193,10194,10195,10196,10197,10198,10199,10200,10201,10202,10203,10204,10205,10206,10207,10208,10209,10210,10211,10212,10213,10214,10215,10216,10217,10218,10219,10220,10221,10222,10223,10224,10225,10226,10227,10228,10229,10230,10231,10232,10233,10234,10235,10236,10237,10238,10239,10240,10241,10242,10243,10244,10245,10246,10247,10248,10249,10250,10251,10252,10253,10254,10255,10256,10257,10258,10259,10260,10261,10262,10263,10264,10265,10266,10267,10268,10269,10270,10271,10272,10273,10274,10275,10276,10277,10278,10279,10280,10281,10282,10283,10284,10285,10286,10287,10288,10289,10290,10291,10292,10293,10294,10295,10296,10297,10298,10299,10300,10301,10302,10303,10304,10305,10306,10307,10308,10309,10310,10311,10312,10313,10314,10315,10316,10317,10318,10319,10320,10321,10322,10323,10324,10325,10326,10327,10328,10329,10330,10331,10332,10333,10334,10335,10336,10337,10338,10339,10340,10341,10342,10343,10350,11184,11195,11219,11220,11221,11222,11223,11225,11226,11228,11257,11258,11392,11393,11394,11409,11410,11432,11433,11434,11435,11443,11452,11453,11456,11464,11480,11484,11691,11698,11721,11728,11731,11739,11764,11765,11793,11797,11803,11808,11817,11820,11834,11839,11871,11878,11891,11895,11925,11936,11937,11944,11976,11977,11998,12000,12023,12025,12033,12046,12052,12056,12062,12069,12077,12084,12086,12087,12324,12344,12355,12364,12386,12390,12396,12403,12418,12458,12459,12460,12461,12529,12550,12551,12555,12591,12595,12607,12609,12650,12651,12662,12663,12680,12690,12709,12711,12743,12744,12750,12751,12754,12756,12758,12770,12760,12765,12767,12781,12785,12802,12804,12814,12815}'::text[]))
  • Rows Removed by Filter: 21
Planning time : 2.119 ms
Execution time : 105,937.532 ms