Re: [GENERAL] Optimize expresiions.

2007-01-12 Thread han . holl
on the order in case of lazy evaluation. Han Holl ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Optimize expresiions.

2007-01-12 Thread han . holl
wrong with the much simpler where cheap_function(item) 0 and where very_expensive_function(item) 0. It's all about the order of evaluation. Thanks, Han Holl ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send

[GENERAL] Optimize expresiions.

2007-01-11 Thread han . holl
? Or is there a hook in the system that would allow me too look at and maybe reorder expressions before they are executed ? Cheers, Han Holl ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Optimize expresiions.

2007-01-11 Thread han . holl
like this has ever be considered ? I seem to encounter many queries where the order in the where clause matters, (but then we have a kind of weird database). Cheers, Han Holl ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner

Re: [GENERAL] I can't build the 8.1.0 source rpm from postgresql.org

2005-11-30 Thread han . holl
On Tuesday 29 November 2005 00:42, Jerry LeVan wrote: /var/tmp/rpm-tmp.58757: line 79: fg: no job control error: Bad exit status from /var/tmp/rpm-tmp.58757 (%prep) [ cut ] Any suggestions? Well, I would look at what line 79 of /var/tmp/rpm-tmp.58757 has to say. Cheers, Han Holl

Re: [GENERAL] Strange order of execution with rule

2005-10-21 Thread han . holl
with something more concrete. Thanks, Han Holl ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Strange order of execution with rule

2005-10-21 Thread han . holl
: Called cfie 1129893542.714536 NOTICE: Called func_display 1129893542.732444 plg_cfie -- (1 row) It's not a plruby issue, I tested with plpgsql (your noti) as well. Cheers, Han Holl ---(end of broadcast)--- TIP 9: In versions below 8.0

[GENERAL] Strange order of execution with rule

2005-10-20 Thread han . holl
different update rules with a select each) but in _all_ cases the second function is executed before the first, or possibly at the same time (but I didn't think the backend is threaded). Is this known behaviour, and what can I do to change it? Thanks in advance for any suggestions, Han Holl P.S. I

[GENERAL] Postgres logs to syslog LOCAL0

2005-10-14 Thread han . holl
shorter that a complet postgresql.conf,here's the diff against /usr/share/pgsql/postgresql.conf.sample, from postgresql-8.0.3-1PGDG for RH9. Have I missed something ? Cheers, Han Holl --- /usr/share/pgsql/postgresql.conf.sample 2005-09-22 15:49:14.0 +0200 +++ /u/postgres

Re: [GENERAL] Postgres logs to syslog LOCAL0

2005-10-14 Thread han . holl
logging and quieter behaviour. None of our applications is using this format, that's for sure. Cheers Han Holl ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] How to inject knowledge into a Postgres database

2005-10-13 Thread han . holl
somewhere ? If the only penalty is slower analyzing, I don't care: we analyze at night when these system are idle. Cheers, Han Holl ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] How to inject knowledge into a Postgres database

2005-10-13 Thread han . holl
improve 1% and worsen 99%. Cheers, Han Holl ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] How to inject knowledge into a Postgres database

2005-10-10 Thread han . holl
%'::text)) Total runtime: 775.068 ms (6 rows) I got a similar problem with a functional index, but I guess my only option is to create a real column with the results of the function, and replace the functional index with a real one. Thanks to all, Han Holl ---(end

[GENERAL] How to inject knowledge into a Postgres database

2005-10-07 Thread han . holl
uneven distribution of surnames (this must be even worse in China). A third possibility would be to rewrite such a query as a nested query: is there a rewrite query - hook (like apaches mod_rewrite) available ? Or is there a somewhere a proxy-server that could do this ? Cheers, Han Holl

[GENERAL] Indexen on 8.0.3

2005-10-06 Thread han . holl
million records). Any suggestions welcome. Cheers, Han Holl ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Indexen on 8.0.3

2005-10-06 Thread han . holl
that something is not equal as well. The trouble is I can't seem to find it. We're going to replay what happened on a different machine, and hopefully will find something. Thanks, Han Holl ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Or selection on index versus union

2005-10-05 Thread han . holl
of docs in the coming months, because real people depend on reasonable performance of our databases. Cheers, and thanks again, Han Holl PS We still have to be careful how to formulate conditions: where fase in ('1','2') is ok, and uses the index, but the logically identical: where position(fase

[GENERAL] Avoiding evaluating functions twice.

2005-10-04 Thread han . holl
anything for me. Of course I can do a select into, but my guess is it would be even more expensive than evaluating these functions twice. Thanks in advance, Han Holl ---(end of broadcast)--- TIP 5: don't forget to increase your free space map

Re: [GENERAL] Redhat 9 RPM dependency problem

2005-10-04 Thread han . holl
file. Once I had rebuild the RPMS and erased the compat libs, everything was fine. Cheers, Han Holl ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Avoiding evaluating functions twice.

2005-10-04 Thread han . holl
something like this: select f from (select expensive_function(table) as f from table offset 0) ss where f is not null; Thanks. I think I can safely say I wouldn't have invented this magic in a year. Cheers Han Holl ---(end of broadcast)--- TIP

[GENERAL] Or selection on index versus union

2005-10-04 Thread han . holl
to it. Is there a way to convince the planner to use the fase index for this type of query, or is there a hook somewhere that I missed that allows me to rewrite a query like the above with a server-side function ? Thanks in advance, Han Holl ---(end of broadcast

Re: [GENERAL] Or selection on index versus union

2005-10-04 Thread han . holl
On Tuesday 04 October 2005 22:26, [EMAIL PROTECTED] wrote: Just a guess but have you tried using an in clause? select something from table where fase in ('1' , '2'); Not surprisingly, this also does a sequential scan on the table. (It would be _very_ diffcult to see that this is a union, I