I assume there are reasons not to throw away join to state. May be it still
can be done as the last thing. This should help further:
SELECT counts.* FROM (
SELECT busbase.state AS state, count(busbase.id) AS m0 FROM busbase
GROUP BY busbase.state ) AS counts
INNER JOIN state USING (state)
R
HI,
I have a wierd problem with PostgreSQL planner...
Problem showed up in Production on PG9.1 (Ubuntu)
But I have succeeded to get the same behavior on my PG 9.2 on Windows...
it is about 3 tables & onad one view - but view have volatile function:
CREATE TABLE t1
(
calc_id serial NOT NULL,
Hi Jeff,
It seems my previous mail has not showed up in the list... copied/pasted
again belloew
However, you said something important:
"The join to the "state" table is not necessary. Between the foreign key
and the primary key, you know that every state exists, and that every state
exists only
On Friday, March 22, 2013, Cindy Makarowsky wrote:
> I have two tables in Postgres 9.2 on a Linux server with 8GB of RAM. The
> first table has 60 million records:
You have over 40GB of data in that table, so there is no way you are going
to get it into 8GB RAM without some major reorganization