From: calendarw <calendarw@gmail.com>
To: Shane Ambler <pgsql@sheeky.biz>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to union table without union statement?
Date: Wed, 7 Mar 2007 09:16:43 +0800
Message-ID: <9d91f7aa0703061716r3698d2a6jc719916ed5a9d86e@mail.gmail.com> (raw)
In-Reply-To: <45E6BB42.9070502@Sheeky.Biz>
References: <9d91f7aa0702280233r7c91dedav1ddfaffa92877280@mail.gmail.com>
<A6C93EF9812C8346A8E8BD6AE573E52D07F52BB7@ARG-EXVS01.corp.argushealth.com>
<9d91f7aa0702281752o31382827kb33b20848a507938@mail.gmail.com>
<45E6BB42.9070502@Sheeky.Biz>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: calendarw@gmail.com, pgsql@sheeky.biz
Subject: Re: How to union table without union statement?
In-Reply-To: <9d91f7aa0703061716r3698d2a6jc719916ed5a9d86e@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox