See "In progress INSERT wrecks plans on table" and "Performance bug in prepared statement binding in 9.2" also on this list
The issues are:1) The planner actually queries the relation to find the end points of the variable ranges, rather than using potentially out-of-date statistics.
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных