Additional information’s – another query with same table gets executed in Oracle in 0.0243 ms. Table size ============== SELECT pg_size_pretty( pg_total_relation_size('npcurren.NUM_AANGESLOTEN_NR') ); pg_size_pretty ---------------- 3585 MB (1 row) -
It’s a physical server, remote DB server in same country(Netherlands) With the same table - 'npcurren.NUM_AANGESLOTEN_NR' another query it’s not even getting executed , it’s get
“killed” in postgres please find the plan below Query =========== SELECT i.* FROM npcurren.num_cps_instelling i,
npcurren.num_aangesloten_nr n WHERE n.fk_exploit_nop_int_oper_id = 'PTT' AND i.telefoonnummer != n.anr_nummer_hoog AND i.telefoonnummer != n.anr_nummer_laag;
Explain Plan ====================== "Nested Loop (cost=2068.47..1769226624.33 rows=101090505159 width=73)"
" Join Filter: (((i.telefoonnummer)::text <> (n.anr_nummer_hoog)::text) AND ((i.telefoonnummer)::text <> (n.anr_nummer_laag)::text))" " -> Seq Scan on num_cps_instelling i (cost=0.00..12485.52 rows=539852 width=73)"
" -> Materialize (cost=2068.47..130399.99 rows=187256 width=22)"
" -> Bitmap Heap Scan on num_aangesloten_nr n (cost=2068.47..129463.71 rows=187256 width=22)"
" Recheck Cond: ((fk_exploit_nop_int_oper_id)::text = 'PTT'::text)"
" -> Bitmap Index Scan on anr_idx6 (cost=0.00..2021.65 rows=187256 width=0)"
" Index Cond: ((fk_exploit_nop_int_oper_id)::text = 'PTT'::text)" From: Bhattacharjee, Soumik
Hi, Please find below "Seq Scan on num_aangesloten_nr (cost=0.00..268192.46 rows=9649046 width=113) (actual time=0.102..2226.525 rows=9649110
loops=1)" "Planning Time: 2.050 ms" "Execution Time: 2785.262 ms" From: Adarsh Sharma <eddy.adarsh@xxxxxxxxx>
Can you please paste explain analyze SELECT * On Thu, Aug 22, 2019 at 8:57 PM <soumik.bhattacharjee@xxxxxxx> wrote:
|