Search Postgresql Archives

Re: Converting string to IN query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <gadsb6$2v2d$1@xxxxxxxxxxxx>,
"Andrus" <kobruleht2@xxxxxx> writes:

> I found that following query works:
> create temp table test ( test int ) on commit drop;
> insert into test values(1);
> select * from test where test = ANY ( '{1,2}' );

> Is this best solution ?

> Will it work without causing stack overflow with 8.2 server  default
> settings
> if string contains some thousands numbers ?

If you get thousands of numbers, it is safer and maybe also faster to
put them into a temporary table, analyze it, and then join it to the
table in question.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux