Re: How to union table without union statement? - Mailing list pgsql-sql

From calendarw
Subject Re: How to union table without union statement?
Date
Msg-id 9d91f7aa0703061716r3698d2a6jc719916ed5a9d86e@mail.gmail.com
Whole thread Raw
In response to Re: How to union table without union statement?  (Shane Ambler <pgsql@Sheeky.Biz>)
List pgsql-sql
I think the tables should contain 50k rows of record and it should be insert 7k rows per month.  And the condition of the database is running, so it should not change the tables to partitioning right now.

I am looking for some JOIN statement but still doesn't understand how to use JOIN to replace UNION, so dose anyone can give me direction?

Thanks.

On 3/1/07, Shane Ambler <pgsql@sheeky.biz> wrote:
Have you done an EXPLAIN on the query?
Is there an index on the tagname columns?
If so does the EXPLAIN show them being used?

How many rows do you have in each table (roughly)?

Have you considered other structure options like partitioning?
Is there a real need to have these tables separate? or could you have
them all in one table with an column to identify the source of the log
entry?

--
Jr. P
calendarw

pgsql-sql by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: best index for ~ ordering?
Next
From: gherzig@fmed.uba.ar
Date:
Subject: Re: best index for ~ ordering?