Hi, Jeremiah,

Jeremiah Jahn schrieb:
> doesn't that cause two queries? I used to do it that way and cut my time
> substantially by counting in-line. Even though the results were cached
> it still took more time.

This sounds rather strange.

> Also since the tables is constantly be updated
> the returned total would not always match the number of results on the
> second query.

Did you run both queries in the same transaction, with transaction
isolation level set to serializable? If yes, you found a serious bug in
PostgreSQL transaction engine.

Markus

-- 
Markus Schaber | Dipl. Informatiker | Software Development GIS

Fight against software patents in EU! http://ffii.org/
                                      http://nosoftwarepatents.org/

---------------------------(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