[GENERAL] File Fragmentation

2013-03-20 Thread jg
the table (but not a full vacuum) i got a large file with freespace at the begining of the file. If all the files were created with that tricks and larger than the maximum data COPYed, i will have no fragmented files. JG -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] File Fragmentation

2013-03-20 Thread jg
igly fragmented files. I have some files with 1,440 fragments a day. JG -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] File Fragmentation

2013-03-20 Thread jg
continous with few fragment. But the pattern is such, that it seems to me really difficult to prevent it. Do you have any idea to mitigate the problem on Windows ? JG -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] File Fragmentation

2013-03-20 Thread jg
on Windows is related to file fragmentation. I try to find a way to analyse the situation. JG -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] File Fragmentation

2013-03-20 Thread jg
sequential scan (logicaly from PostgreSQL point of view) is in fact random (filesystem point of view). JG Le Mercredi 20 Mars 2013 15:47 CET, j...@rilk.com a écrit: > Hi, > > I create a test cas on Linux: > postgres=# create table a (v int); > postgres=# create table b (v int

[GENERAL] Where is diskchecker.pl ?

2012-07-18 Thread jg
Hi, The PostgreSQK documentation refers to diskchecker.pl on the page http://brad.livejournal.com/2116715.html But on this page, the given link for diskchecker.pl does not exist anymore. After some unsuccessfull queries on Google to find the missing file, I wonder if one of you have a lin or a co

[GENERAL] Heavy Function Optimisation

2012-12-21 Thread jg
Hi, In a projet, I have an heavy fonction that double the time of the query. I was surprised because the function was IMMUTABLE but no cache happens. So I wrote a small test. test.sql --- \timing on CREATE OR REPLACE FUNCTION dum(a int) RETURNS int LANGUAGE SQ

[GENERAL] Coalesce bug ?

2012-12-21 Thread jg
Hi, In PostgreSQL 9.2, I have the following behavior, and I found it strange. ps3 is executed or "never executed" ? !!! JG [postgres@]test=# create or replace function ps3(a int) returns int as $$ BEGIN RAISE WARNING 'Call ps3(%)=%',$1,$1; RETURN $1::int; END; $$ LAN

Re: [GENERAL] Coalesce bug ?

2012-12-21 Thread jg
Hi, > In PostgreSQL 9.2, I have the following behavior, and I found it strange. Sorry the test was with 9.1.6 # psql -V psql (PostgreSQL) 9.1.6 JG -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailp

Re: [GENERAL] Coalesce bug ?

2012-12-21 Thread jg
untime: 0.022 ms (9 lignes) Temps : 0,774 ms [postgres@]test=# select coalesce( ps3(1), ps3(2) ); WARNING: Call ps3(1)=1 coalesce -- 1 (1 ligne) Temps : 0,562 ms [postgres@]test=# There is a bug ! Thank you for the documentation link, but it does not help me. JG -- Sent

Re: [GENERAL] Coalesce bug ?

2012-12-21 Thread jg
(never executed) Output: 2 Total runtime: 0.079 ms (9 rows) pgb=# select coalesce( ps3(1), ps3(2) ); WARNING: Call ps3(1)=1 coalesce -- 1 (1 row) There is a bug too. JG -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] Coalesce bug ?

2012-12-21 Thread jg
Hi, Interesting idea. With VOLATILE, the bug disappears. With IMMUTABLE, the EXPLAIN and the execution does not match That is a bug. Even if the behavior has to be different in VOLATILE and IMMUTABLE, the EXPLAIN and the execution MUST be coherent. JG [postgres@]test=# create or replace

[GENERAL] Heavy function optimisation ?

2012-12-21 Thread jg
Hi, In a projet, I have an heavy fonction that double the time of the query. I was surprised because the function was IMMUTABLE but no cache happens. So I wrote a small test. test.sql --- \timing on CREATE OR REPLACE FUNCTION dum(a int) RETURNS int LANGUAGE SQ

Re: [GENERAL] Coalesce bug ?

2012-12-22 Thread jg
Hi, > Ah. The reason for that is a bit subtle: constant-folding of immutable > functions happens in the same pass over the query tree as simplification > of simplifiable constructs --- including COALESCE. So what's happening > is that eval_const_expressions, working on the COALESCE construct, fi

[GENERAL] Database denormalization

2012-02-14 Thread JG
Hi I would like to ask weather PostgreSQL does database denormalization at runtime. That is, for example, if I have a normalized database and I use lots of querys that would run faster on a denormalized database, than will PostgreSQL create a denormalized version of the database for internal u