Re: [PERFORM] Slow function in queries SELECT clause.

2010-08-12 Thread Davor J.
> "Tom Lane" wrote in message > news:25116.1277047...@sss.pgh.pa.us... >> "Davor J." writes: >>> Suppose 2 functions: factor(int,int) and offset(int, int). >>> Suppose a third function: convert(float,int,int) which simply returns >>>

Re: [PERFORM] Slow function in queries SELECT clause.

2010-06-21 Thread Davor J.
a way to affect the functions. So, as far as I understand the Postgres workings, this shouldn't pose a problem. Regards, Davor "Tom Lane" wrote in message news:25116.1277047...@sss.pgh.pa.us... > "Davor J." writes: >> Suppose 2 functions: factor(int,int) and

Re: [PERFORM] Slow function in queries SELECT clause.

2010-06-20 Thread Davor J.
out time zone))" "-> Bitmap Index Scan on tbl_sensor_channel_data_pkey (cost=0.00..2978.92 rows=105456 width=0) (actual time=27.433..27.433 rows=150678 loops=1)" " Index Cond: ((tree_id = 70) AND (sens_chan_data_timestamp >= '2008-06-11 00:00:00&#x

[PERFORM] Slow function in queries SELECT clause.

2010-06-20 Thread Davor J.
I think I have read what is to be read about queries being prepared in plpgsql functions, but I still can not explain the following, so I thought to post it here: Suppose 2 functions: factor(int,int) and offset(int, int). Suppose a third function: convert(float,int,int) which simply returns $1*

[PERFORM] queries with subquery constraints on partitioned tables not optimized?

2010-02-02 Thread Davor J.
Let's say you have one partitioned table, "tbl_p", partitioned according to the PK "p_pk". I have made something similar with triggers, basing myself on the manual for making partitioned tables. According to the manual, optimizer searches the CHECKs of the partitions to determine which table(s)