Re: [SQL] max length of sql select statement (long!)

2003-07-14 Thread markus brosch
It's me again - with the easy and complex statement at the same time ;-) Who can help me?! As far, my solution is still unsatisfactory. I'll explain my full task this time, otherwise it is hard to explain! My tables: (redundant for speed reasons - doesn't matter - only requests!) ===

[SQL] max length of sql select statement ?

2003-07-09 Thread markus brosch
Hi All! I was searching the archive and was wondering why nobody asked this strange question (or I've not found it?): "What is the max allowed length of a sql statement or query?" I want to combine hundrets or thousands 'OR' within a select statement. Possible or not? cheers Markus ---

Re: [SQL] max length of sql select statement ?

2003-07-09 Thread markus brosch
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 vi

Re: [SQL] max length of sql select statement ?

2003-07-09 Thread markus brosch
On Mon, 2003-07-07 at 18:20, Rod Taylor wrote: > > Could be a solution?! > > The question is - how long could the IN be? > > I'm not sure about IN specifically, but I know you can do: > SELECT * FROM table WHERE col = '<1GB long file>'; > It tends not to be friendly for Ram though :) Hi again!

Re: [SQL] max length of sql select statement ?

2003-07-07 Thread markus brosch
> > but how are you searching through your table with sql, when your SELECT > > is against a collection of different elements (e.g. Array of Strings, > > which should fit on one column and return all records which fit) > > Are the 'a', 'b', etc... fixed or generated on the fly? I'm not sure > th

Re: [SQL] max length of sql select statement ?

2003-07-07 Thread markus brosch
On Mon, 2003-07-07 at 18:13, [EMAIL PROTECTED] wrote: > Well i DO NOT know the exact limit. > May be someone else can answer it accurately. > > But you could produce the list within IN using a subselect > that again depends on the exact problem. > Maybe anybody knows how many? Anyway: My exact

Re: [SQL] max length of sql select statement ?

2003-07-07 Thread markus brosch
On Mon, 2003-07-07 at 17:57, [EMAIL PROTECTED] wrote: > Depending on ur original problem EXISTS or IN may be usable > EXISTS is efficient and IN can be used efficiently in 7.4 version > of postgresql Could be a solution?! The question is - how long could the IN be? I mean, if I write something l

[SQL] max length of sql select statement ?

2003-07-07 Thread markus brosch
Hi All! I was searching the archive and was wondering why nobody asked this strange(!) question (or I've not found it?): "What is the max allowed length of a sql statement or query?" I want to combine hundrets or thousands 'OR' within a select statement. Possible or not (e.g: SELECT * FROM table