> > The same query, executed from pgAdmin, returns the result in less than a > second (even if it’s executed while the query from my app is running). > > (actually the result are 0 record, but it’s correct: the query it’s just > a validation that there are no records in that query)
[snip]
> Do you have any suggestions to solve this problem? >
Run ANALYZE on the tables/database.
If ANALYZE was the cure, why does it successfully run from PgAdmin?