3
votes
2answers
245 views

How to make PostgresQL optimizer to build execution plan AFTER binding parameters?

I'm developing Pg/PLSQL function for PostgresQL 9.1. When I use variables in a SQL query, optimizer build a bad execution plan. But if I replace a variable by its value the plan is ok. For instance: ...
2
votes
1answer
81 views

Optimise multiple OR query

I have a Database table where I need to validate if a user has entered in the same or partly the same information. Here is what I'm thinking The db layout rec_id (pk), user_id, name, phone, ...