On 1 Jun 2015, at 7:37pm, Amol Kandurwar <onlineamol at gmail.com> wrote:
> SELECT foo, boo FROM mytable WHERE foo LIKE 'hi%' GROUP BY boo; Try the following: CREATE INDEX m_fb ON mytable (foo, boo); CREATE INDEX m_bf ON mytable (boo, foo); ANALYZE; SELECT foo, boo FROM mytable WHERE foo BETWEEN 'hi' AND 'hizzz' GROUP BY boo; See what happens. Use the results of that to work to wards a more convenient solution. Simon.

