Improve PostgreSQL SELECT performance in a parent table (inheritance)
But when I run the same SELECT in the father table, it is slow. I saw the EXPLAIN and seems that PostgreSQL uses each child's index, instead of use only the father index.


To search in the father table only, use the ONLY keyword:

 SELECT FROM ONLY MasterAccount.imovel ....


The manual:


  If ONLY is specified before the table name, only that table is scanned.