explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RqhL

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 11,990.167 ↑ 3.0 431 1

Finalize GroupAggregate (cost=46,645.43..46,832.41 rows=1,275 width=98) (actual time=11,862.574..11,990.167 rows=431 loops=1)

  • Group Key: datasource_id, agency_id
2. 0.000 11,991.356 ↓ 1.2 1,292 1

Gather Merge (cost=46,645.43..46,788.99 rows=1,080 width=98) (actual time=11,862.352..11,991.356 rows=1,292 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 179.901 35,944.683 ↑ 1.3 431 3

Partial GroupAggregate (cost=45,645.41..45,664.31 rows=540 width=98) (actual time=11,858.900..11,981.561 rows=431 loops=3)

  • Group Key: datasource_id, agency_id
4. 643.350 35,764.782 ↓ 782.6 422,599 3

Sort (cost=45,645.41..45,646.76 rows=540 width=34) (actual time=11,858.738..11,921.594 rows=422,599 loops=3)

  • Sort Key: datasource_id, agency_id
  • Sort Method: external merge Disk: 19056kB
  • Worker 0: Sort Method: external merge Disk: 19080kB
  • Worker 1: Sort Method: external merge Disk: 19040kB
5. 33,128.875 35,121.432 ↓ 782.6 422,599 3

Parallel Bitmap Heap Scan on service_view s0_ (cost=3,817.25..45,620.90 rows=540 width=34) (actual time=2,002.650..11,707.144 rows=422,599 loops=3)

  • Recheck Cond: ((booking_date >= '2019-01-01 00:00:00'::text) AND (booking_date <= '2019-10-07 23:59:59'::text))
  • Rows Removed by Index Recheck: 142035
  • 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,4805,2831,4810,2835,4807,2837,4809,2846,4755,4804,2872,966,2550,2910,4814,4820,2918,2919,1440,2921,971,2946,965,1530,2947,2948,2949,2950,2951,4644,2989,2993,3834,1475,4552,4730,1522,4634,3825,4731,4654,4652,1529,176,4767,2664,2541,2665,4768,2667,4782,2668,2669,2546,4576,4787,4758,4759,2707,4761,2708,2718,4762,2734,4819,4763,2745,4764,2750,2754,4765,2974,2975,4766,4740,2769,2392,2779,2781,2788,2790,4802,2792,2825,2847,2854,2894,2925,2926,2963,1557,2967,3835,1537,2968,3065,2973,2980,2530,4556,1549,4424,4583,4803,1543,4584,4798,1550,2687,2491,985,4815,4610,1466,3636,1539,1562,4742,4640,996,3045,3352,4426,4743,2573,3350,2662,2616,2551,2673,3832,2684,2533,2694,2589,2596,3823,3657,3043,3052,2690,2537,3291,3292,2711,2742,2705,2725,2716,2722,2727,2730,2731,2733,2739,2746,2741,2747,2768,2749,2799,2765,2811,2789,2814,2817,2807,2833,2834,2836,2838,2840,2844,2859,2849,2866,2887,2890,4796,2861,4788,2922,2862,2936,2943,4792,2873,4793,2875,4794,2959,2966,2877,2590,3559,4799,2878,2879,4789,4578,4602,2880,4604,4603,4797,975,4651,2881,4800,2920,4812,2923,4821,4770,2942,4816,2987,4811,2988,4806,2964,4817,2970,4813,4822,2617,2976,4818,2977,1453,2979,1526,2996,1527,4650,4655,4557,3732,3701,2658,2659,2663,2672,2674,4575,2676,4555,2682,2561,2563,2548,2571,2534,2602,4582,2689,2587,3700,2516,2704,2714,2721,2735,2744,2751,2752,2753,2757,2782,2800,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: 861795
  • Heap Blocks: exact=18147 lossy=22142
6. 1,992.557 1,992.557 ↓ 383.9 3,853,181 1

Bitmap Index Scan on idx_s_booking_date (cost=0.00..3,816.92 rows=10,037 width=0) (actual time=1,992.557..1,992.557 rows=3,853,181 loops=1)

  • Index Cond: ((booking_date >= '2019-01-01 00:00:00'::text) AND (booking_date <= '2019-10-07 23:59:59'::text))
Planning time : 0.925 ms
Execution time : 11,994.669 ms