From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | markus brosch <brosch(at)gmx(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: max length of sql select statement ? |
Date: | 2003-07-09 17:02:20 |
Message-ID: | 1057770139.46100.93.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Wed, 2003-07-09 at 15:51, markus brosch wrote:
> On Wed, 2003-07-09 at 17:45, Rod Taylor wrote:
> > > Nobody a better idea? Why is the join of a temporary table (the IN
> > > paramters) and the original table so slow? Any tricks here?
> >
> > Did you index and ANALYZE the temporary table?
>
> No!
>
> I have to do this "strange" and "long" statement also a view thousand
> times ... so I always have to create the temp table again and again and
> if I index the table it costs me more time.
So.. which costs more. Building the index + fast query or doing the
slow query?
If you have anything more than a thousand lines in the temp table, I bet
indexing it would be the better way to go.
> As far I am relativly new to SQL, I ask you:
> Where's the difference between and indexed temp (!!!) table and an
> unindexed one? The main table is of course fully indexed ;-)
One has an index, which means that other (much faster) methods may be
available for the database to use.
From | Date | Subject | |
---|---|---|---|
Next Message | Yasir Malik | 2003-07-09 18:49:16 | Re: Datatype conversion help |
Previous Message | markus brosch | 2003-07-09 15:51:35 | Re: max length of sql select statement ? |