Josh Berkus wrote:
Sebastian,


I'm having another problem with a query that takes to long, because
the appropriate index is not used.


PostgreSQL is not currently able to push down join criteria into UNIONed subselects. It's a TODO.

And the appends in a "SELECT * from parent" are UNIONs, aren't they?

Also, if you're using inherited tables, it's unnecessary to use UNION; just select from the parent.

Yes, but then no index is used...

Sebastian



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to