explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wKzI

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1,083.176 ↑ 1.0 1 1

Limit (cost=0.43..13.55 rows=1 width=102) (actual time=1,083.175..1,083.176 rows=1 loops=1)

  • Output: id, posted_date, journal_id, account_id, currency, value, is_credit, description, invoice_id, customer_rebate_id, product_id, corrected, correction_for_ledger_entry_id
  • Buffers: shared hit=171,686
2. 1,083.174 1,083.174 ↑ 160,933.0 1 1

Index Scan Backward using ledger_entry_pkey on public.ledger_entry (cost=0.43..2,111,337.28 rows=160,933 width=102) (actual time=1,083.174..1,083.174 rows=1 loops=1)

  • Output: id, posted_date, journal_id, account_id, currency, value, is_credit, description, invoice_id, customer_rebate_id, product_id, corrected, correction_for_ledger_entry_id
  • Filter: ((ledger_entry.posted_date < '2020-10-15 00:00:00+00'::timestamp with time zone) AND (ledger_entry.account_id = ANY ('{27199,21266,53191,18961,27348,21267,53385,18962,27497,21268,53579,18963,31497,31652,31807,31962,32117,32272,32427,32582,32737,32892,33047,33202,33357,33512,33667,33822,33977,2726,7547,2386,12569,2388,2390,2384,14061,14063,6853,2392,4174,2394,14065,2396,10701,2398,2727,7548,2387,12570,2389,2391,2385,14062,14064,6854,2393,4175,2395,14066,2397,10702,2399,2894,7815,2405,12909,2410,2415,2400,15093,15098,7119,2420,4378,2425,15103,2430,11023,2435,27646,21269,53773,18964,27795,21270,53967,18965,27944,21271,54161,18966,28093,21272,54355,18967,28242,21273,54549,18968,28391,21274,54743,18969,28540,21275,54937,18970,28689,21276,55131,18971,28838,21277,55325,18972,28987,21278,55519,18973,29136,21279,55713,18974,29285,21280,55907,18975,29434,21281,56101,18976,2897,7818,2408,12912,2413,2418,2403,15096,15101,7122,2423,4381,2428,15106,2433,11026,2438,34147,34302,34457,34612,34767,34922,35077,35232,35387,35542,35697,35852,36007,36162,36317,36472,36627,2895,7816,2406,12910,2411,2416,2401,15094,15099,7120,2421,4379,2426,15104,2431,11024,2436,2896,7817,2407,12911,2412,2417,2402,15095,15100,7121,2422,4380,2427,15105,2432,11025,2437,2898,7819,2409,12913,2414,2419,2404,15097,15102,7123,2424,4382,2429,15107,2434,11027,2439,29583,21282,56295,18977}'::bigint[])))
  • Rows Removed by Filter: 398,103
  • Buffers: shared hit=171,686