I have two table:
master_table:
pk_id bigint primary key,
name text
child_table :
chk_id bigint,
pk_id bigint
mob varchar(15)
foreign key pk_id to master_table
index on pk_id of child
query which was taking seconds on the join of these two table suddenly started taking 20/25 min
child table has @ 100M rows
The only deifference was I dropped the foreign key pointing to parent pk_id after this the planner is ignoring to use index scan on child table and doing seq scan.
Is it because I dropped foreign key?
Thanks in advance
With regards
Ashish...
Now you can chat without downloading messenger. Click here to know how.