We really need this solved. Isn't anybody able to shed some light on
this? Is it possible to make this query use an index scan, preferably
w/o disabling sequential scanning?
ditch the inheritance. it is no good, and makes everything too complicated to work with.
in case you can't, do something similar to this:
select * from
(
select * from only table_a order by number desc limit 25
union
select * from only table_b order by number desc limit 25
union
select * from only table_c order by number desc limit 25
) x
order by number desc limit 25;
it should be faster. and yes, i know it's ugly.
depesz
--
http://www.depesz.com/ - nowy, lepszy depesz