<SNIP>
> > Under this condition, I want get some useful suggestion from you. How to
> > optimize the database? How to improve the Count(*)? Because we want to
> > get the number of records in the recordset we got.
>
> If you are using say libpq, you don't need to issue a select count(*) where
> foo and select where foo, to obtain record count and the records themselves.
> I believe every other interface stemming from libpq should provide any such
> hooks as well. Never used any other myself (barring ecpg)
The python interfaces most definitely do. Doing the count is quite
unnecessary just as Shridhar points out.
> HTH
>
> Shridhar
>