Kishore B <kishorebh@gmail.com> writes:
>> I surmise that you are testing on toy tables and extrapolating to what
>> will happen on larger tables.
>>
> These tables participating here contain more than 8 million records as of
> now, and on every day, 200K records, will add to them.
In that case, have you ANALYZEd the tables lately? The planner's cost
estimates correspond to awfully small tables ...
regards, tom lane