On Jan 19, 2006, at 8:17 , [EMAIL PROTECTED] wrote:
Are there performance advantages that can be achieved by wrapping a
complex SELECT into a stored procedure?
I believe it depends on the procedural language. If it's SQL, I think
it may be inlined, so you'd have overhead due to the stored p
Are there performance advantages that can be achieved by wrapping a
complex SELECT into a stored procedure?
Alex
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
It is easier to think of this as SET INTERSECTION which leads to:
SELECT id FROM urights WHERE right = 2
INTERSECT
SELECT id FROM urights WHERE right = 5
INTERSECT
SELECT id FROM urights WHERE right = 10
Ivan Steganov wrote:
Thank you to everyone for the great help!
I will evaluate all methods
Emil Rachovsky wrote:
While trying to create some views I stumbled on some
problem with using the if-then clause. Here is a
simple example :
CREATE OR REPLACE VIEW public.SomeView
as select d.id,
if (true) then d.DocNumber endif from
public.Z_Documents as d;
I get the following error :
syn
Michael Glaesemann wrote:
On Jan 18, 2006, at 21:48 , Volkan YAZICI wrote:
AFAICS, the bottleneck in above query is ANY(ARRAY[]) clause usage.
Instead of that, if you replace «rights = ANY(ARRAY[2,5,10])» with
«rights IN (2,5,10)» it's overhead decreases to 0.200-0.300ms domain.
explain an
Thank you to everyone for the great help!I will evaluate all methods in our query (It is actually well complexer then this sample) and choose the best one.Is there any "scientific" name to this kind of "several rows match for one result" data selection?
Ivan
On Jan 18, 2006, at 21:48 , Volkan YAZICI wrote:
AFAICS, the bottleneck in above query is ANY(ARRAY[]) clause usage.
Instead of that, if you replace «rights = ANY(ARRAY[2,5,10])» with
«rights IN (2,5,10)» it's overhead decreases to 0.200-0.300ms domain.
explain analyze
SELECT id
FROM (
SE
On Jan 18 09:33, Michael Glaesemann wrote:
> On Jan 18, 2006, at 20:55 , Volkan YAZICI wrote:
> >SELECT t.id
> >FROM (SELECT id, sum(1) AS s
> > FROM id_n_rights
> > WHERE rights = ANY(ARRAY[2,5,10])
> > GROUP BY id) AS t
> >WHERE t.s = 3;
AFAICS, the bottleneck in above query is
On Jan 18, 2006, at 4:18 AM, Emil Rachovsky wrote:
While trying to create some views I stumbled on some
problem with using the if-then clause. Here is a
simple example :
CREATE OR REPLACE VIEW public.SomeView
as select d.id,
if (true) then d.DocNumber endif from
public.Z_Documents as d;
I
On Jan 18, 2006, at 20:55 , Volkan YAZICI wrote:
On Jan 18 05:43, Ivan Steganov wrote:
IDRIGHT
-
201
202
205
2010
302
3010
Now I need to find out which IDs have, say rights 2 AND 5 AND 10.
SELECT t.id
FROM (SELECT i
Hi,
On Jan 18 05:43, Ivan Steganov wrote:
> IDRIGHT
> -
> 201
> 202
> 205
> 2010
> 302
> 3010
>
> Now I need to find out which IDs have, say rights 2 AND 5 AND 10.
SELECT t.id
FROM (SELECT id, sum(1) AS s
FROM
On Jan 18, 2006, at 19:23 , Achilleus Mantzios wrote:
Generally it is very hard to distinguish between two kind of UPDATES:
a) UPDATEs that mean real data updates and they should be recorded
to the history system.
b) UPDATEs that are just false data entry, and they should mean
just plain corre
On Jan 18, 2006, at 18:18 , Emil Rachovsky wrote:
CREATE OR REPLACE VIEW public.SomeView
as select d.id,
if (true) then d.DocNumber endif from
public.Z_Documents as d;
I get the following error :
syntax error at or near "then" at character 72
Well, one problem is that IF ... ENDIF is the
O Ken Winter έγραψε στις Jan 17, 2006 :
> Friends ~
>
> I'm still trying to implement a solution to the requirement to keep a
> complete history of data changes to a "person" table. (See earlier
> correspondence below.) I'm trying for a variant of the architecture
> suggested by Richard Huxton
While trying to create some views I stumbled on some
problem with using the if-then clause. Here is a
simple example :
CREATE OR REPLACE VIEW public.SomeView
as select d.id,
if (true) then d.DocNumber endif from
public.Z_Documents as d;
I get the following error :
syntax error at or near "t
15 matches
Mail list logo