Gunther Schadow <gunther@aurora.regenstrief.org> writes:
> We also noted that a
> SELECT COUNT(*) FROM BigQuery;
> can take quite a long time and again use a lot of resources,
> whereas
> SELECT COUNT(smallcolumn) FROM BigQuery;
> may be faster and less resource consuming.
This is complete nonsense... if anything, the second one will take
more cycles, since it has to actually examine a column.
As for the other thing, use a cursor and "fetch" a few rows at a time
if you want to overlap frontend and backend processing.
regards, tom lane