explain.depesz.com

PostgreSQL's explain analyze made readable

Result: prja

Settings
# exclusive inclusive rows x rows loops node
1. 0.827 9,644.263 ↑ 6.6 431 1

Finalize GroupAggregate (cost=2,895,688.58..2,896,524.62 rows=2,850 width=98) (actual time=9,643.121..9,644.263 rows=431 loops=1)

  • Group Key: datasource_id, agency_id
2. 0.000 9,643.436 ↑ 4.4 1,293 1

Gather Merge (cost=2,895,688.58..2,896,353.62 rows=5,700 width=98) (actual time=9,643.107..9,643.436 rows=1,293 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.771 28,915.626 ↑ 6.6 431 3

Sort (cost=2,894,688.55..2,894,695.68 rows=2,850 width=98) (actual time=9,638.522..9,638.542 rows=431 loops=3)

  • Sort Key: datasource_id, agency_id
  • Sort Method: quicksort Memory: 85kB
  • Worker 0: Sort Method: quicksort Memory: 85kB
  • Worker 1: Sort Method: quicksort Memory: 85kB
4. 413.595 28,914.855 ↑ 6.6 431 3

Partial HashAggregate (cost=2,894,482.26..2,894,525.01 rows=2,850 width=98) (actual time=9,638.028..9,638.285 rows=431 loops=3)

  • Group Key: datasource_id, agency_id
5. 28,501.260 28,501.260 ↑ 1.4 422,585 3

Parallel Index Scan using idx_s_booking_date on service_view s0_ (cost=0.56..2,883,823.55 rows=609,069 width=34) (actual time=0.030..9,500.420 rows=422,585 loops=3)

  • Index Cond: ((booking_date > '2019-01-01 00:00:00'::timestamp without time zone) AND (booking_date <= '2019-10-06 23:59:59'::timestamp without time zone))
  • Filter: (((agency_id <> ALL ('{998,3959,2606,3056,4562,4165,4579,465,1541,4618,2899,4616,4185,4008,1536,1544,4059,963,1471,1552,4295,4649,1545,3970,4061,4292,2783,1450,4099,3703,1559,2621,983,981,4601,4055,1540,1477,1554,3847,4118,2994,2845,4230,2882,2827,4382,1561,4029,3930,2809,4247,4138,3974,2810,2897,2958,2794,4157,2955,2801,2715,2786,4155,2984,4009,4407,3373,2969,2515,4288,2553,2661,2867,4024,2956,2770,4488,2619,3943,3831}'::bigint[])) OR (agency_id IS NULL)) AND (((organiser_code)::text <> ALL ('{Z-ABGEB-PROV,GUTSCH,$SITZ,Barzah,GUT,GUTS,Z-CC-SONSTIGE,Z-CC-VISA,Z-CC-MASTERCARD,9600,6106,7643,7054,7101,7923,9640,7996,8350,9389,7033,5000,7767,904,7005,7602,7801,9994,9993,9997,9981,7924,7726,8503,7098,9602,7027,7028,9999,8355,9625,9603,9623,9642,7879,7900,7979,7766,7743,7903,7746,9622,5924,7409,9913,9624,9620,9991,7604,7051,9992,7901,5920,8295,7929,7805,7038,7930,9605,7702,8296,9641,7603,7601,7006,7000,1943,7926,7053,7902,7032,7904,7947,7741,7200,7769,7383,7388,7934,7776,7367,1298,7943,7960,9891,9388,9583,7747,7999,7944,7698,7763,7788,7783,7931,7381,7919,7110,7942,8140,7080,7709,8524,7100,3498,7723,4300,7884,7736,7771,7761,4149,9990,8520,9911,7735,7711,9041,7940,7985,7986,7105,7768,7995,7607,4220,7733,1901,7039,7397,9573,9471,9996,9982,7074,7722,9626,7410,9645,9682,6001,7390,7412,9224,1520,9643,7775,4979,7731,8353,6000,7024,9220,9606,9604,7925,7989,7600,7606,7941,7987,7909,8500,7905,7787,7780,7760,9995,7073,7885,4899,8274,8857,2999,8995,8050,7052,8504,7749,7866,INCC,FAMI,DIREKT_INT,FLUG,INSO,PROV_DV,GUT_INT,INTBEZ,PROV_SONSTIGE,"AUSGLEICH RECHN.NR",EINZ,UATP,REISE,7610,7612,7614,7615,7616,7619,7622,7727,7915,7779,7072,8354,7737,7748,8910,PROV_ABGABE_STFREI,PROV_ABGABE_STPFL,"ABSTIMM < 125","ABSTIMM > 125",ANZ,ANZAHLUNG,AUSGL_RE,SE_CC_24H,ERLOES_VERR,"GUT FIRMEN",GUT_EINL,"GUT FREMD",HOTEL_PROV,PROV_MA_STFREI,PROV_INTERN,PROV_EIVA_INT,PROV_EIVA_LES,PROV_EIVA_MMWST,PROV_PEN,PROV_MA,PROV_MMWST,IATA_INT,IATA_EIGEN,INTFL,INTCC,KOSTEN_VERR,KUL,PROV_ABGABE_MWST,PROV_MWST,VERS_SELBSTBEHALT,0300,0301,300,301,7968,9983,9998,7729,7952,7913,7742,7789,8602,ZAHL_BEZ_TICKET,ZAHL,"INT BEZ",ZAHL_BEZ_HTL,AUSGL_RG,GUT1,ZAHL_BEZ_SONST,ZAHL_BEZ_BAHN,ZAHL_BEZ_FÄHRE,INTBEZU,7939,7719,7712,7774,7859,VERS_FÄLLE,REISESTELLENKARTE,CCLOW,7138,ZAHL_BEZ_CAR,7714,7932,FILIALE_INTERN,INTDB,7132,PROV_AUSLAGE_MA,7772,1,7781,7707,7721,7734,GUT_BEST,GUT2,INTERNE}'::text[])) OR (organiser_code IS NULL)) AND (agency_id = ANY ('{1555,4790,4791,4795,1547,1548,1476,1478,1525,1551,1441,1546,1533,1534,1535,1531,1532,1474,1564,2796,3838,3839,4633,2618,2620,4750,2558,2622,2623,2624,4749,2626,2544,2538,2628,2629,2630,2631,2632,2633,2634,2650,2536,2560,2696,2697,2698,2699,2700,2701,2703,2795,2819,2820,2821,2822,2960,2853,2870,2929,2930,2935,2931,2938,2939,2940,2941,4663,4662,2911,2913,2944,2945,2914,4659,4728,4729,4727,4428,4485,4486,4487,4657,4444,4544,4545,4546,4547,4548,4549,4550,4660,4808,4771,3064,1447,1467,1468,4630,4628,4629,4631,4638,4725,2390,2388,2651,4741,2666,2675,2681,2683,2572,2585,3290,3824,4585,2688,3044,2693,2706,2712,2717,2713,2729,2748,2766,2767,2778,2805,2816,2830,2850,2613,2852,2856,2868,2876,2883,2884,2898,2932,2933,2934,2954,2992,1521,4783,4784,4785,4786,4801,4774,4776,4757,4777,4778,4780,4760,1558,1560,2514,1436,3066,2528,3597,4643,4746,4732,4745,1472,4632,2642,3752,2647,2657,2677,3354,2562,2678,2577,2578,2605,2695,2691,2692,2723,2760,2761,2771,2756,2743,2772,2791,2803,2813,2823,2824,2826,2829,2839,3050,2874,2900,2901,4781,2927,2961,2962,2972,2971,2982,2983,2995,3046,3047,2598,4600,4773,4779,4772,4775,4769,3702,1524,4647,2627,2679,2568,3573,3822,4577,2724,2728,2736,2758,2804,2808,2831,2835,2837,2846,2872,2550,2910,2918,2919,2921,2946,2947,2948,2949,2950,2951,2989,2993,4552,1522,4654,4767,4768,4782,4787,4758,4759,4761,4762,4763,4764,4765,4766,2392,1557,1537,3065,2530,1549,4583,4584,2687,4610,3636,4742,3045,4426,2573,2616,3832,2694,3823,3052,3291,2705,2725,2727,4805,2733,2746,4810,2747,4807,2749,4809,2765,2789,4755,2807,4804,2836,2840,966,4814,2849,4820,1440,2861,971,2862,2873,965,2875,1530,2877,4644,2878,2879,2880,3834,975,1475,2881,2920,4730,2923,4634,2942,3825,2987,2988,2964,4731,2970,4652,2617,2976,1529,176,2977,2979,2996,2664,2541,2665,4557,2667,2668,2669,4575,2546,4555,2768,4576,2799,2811,2707,2814,2708,2718,2817,2734,2833,4819,2834,2745,2838,2750,2844,2754,2859,2974,2975,2866,4740,2769,2887,2779,2781,2890,2788,2922,2790,4802,2792,2936,2825,2943,2847,2959,2854,2894,2925,2926,2966,2963,2590,2967,3559,3835,4578,2968,2973,4602,2980,4556,4604,4424,4603,4651,4803,4812,1543,4798,4821,1550,2491,4816,4811,985,4815,4817,1466,4813,1539,4822,1562,4818,4640,996,1453,3352,4743,1526,1527,3350,4650,2662,2551,4655,2673,2684,3732,2533,3701,2589,2658,2596,2659,2663,3657,2672,3043,2674,2690,2676,2537,2682,3292,2711,2742,2561,2563,2716,2548,2571,2722,2534,2730,2602,2731,4582,2739,2741,4796,2689,2587,4788,3700,2516,4792,4793,2704,4794,2714,2721,4799,2735,2744,4789,2751,4797,2752,2753,4800,2757,2782,4770,2800,4806,2802,2815,4613,2818,2843,2855,2857,2858,2860,2863,2865,2869,4619,2892,2893,2902,2903,2904,2905,2908,2952,2981,2614,2991,4558,4427,4581,2639,2640,4605}'::bigint[])))
  • Rows Removed by Filter: 861445
Planning time : 2.647 ms
Execution time : 9,644.423 ms