[HACKERS] Recursive SQL

2005-04-03 Thread Ioannis Theoharis
Also i'd like to answer you if postgresQL has implemented rcursive queries proposed from SQL99 standard? If yes, are there any restrictions of the model on your implementation? ---(end of broadcast)--- TIP 2: you can get off all lists at once wit

[HACKERS] Transitive Closure and 'pg_inherits'

2005-04-03 Thread Ioannis Theoharis
Hi, in case one use 'inherits' relationship to create a hierarchy of tables, table 'pg_inherits' stores for each table the information of which is its parent table. During the evaluation of a query like select * from Root; where Root is the 'root' table of our hierarchy, postgreSQL needs to fi

[HACKERS] Explain Analyze mode

2005-03-11 Thread Ioannis Theoharis
Hi, i found this form of output of explain analyze, watching some old mails in lists. test4=# explain analyze select * from patients; LOG: query: explain analyze select * from patients; LOG: duration: 0.603887 sec LOG: QUERY STATISTICS ! system usage stats: ! 0.624269 elapsed 0.458985 u

Re: [HACKERS] Raw size

2005-03-11 Thread Ioannis Theoharis
> > > > Is there any compression or what? > > Yes, there is: > > http://www.postgresql.org/docs/8.0/interactive/storage-toast.html thanks, is there any way to increase the limit, upper wich toast strategy is selected? By defaullt is Block_size/4 = about 2000 Bytes. ---

Re: [HACKERS] Raw size

2005-03-11 Thread Ioannis Theoharis
> > varchar means 'character varying'. What varies is the length. So a > varchar(1000) with 'foo' in it only takes a few bytes ('foo' plus length > info) instead of 1000 bytes. Yes i know it, but i have vorgotten to inform you that all the values of this attribute have really 1000 characthers le

[HACKERS] Raw size

2005-03-10 Thread Ioannis Theoharis
Hi, i have a table: create table triples( att0 varchar(1000), att1 int4, att2 varchar(20), att3 varchar(1000) ) My table has 990 raws. The (possibly wrong) way, with wich i compute the size of the table is: att0: 1000 * 1 Byte + 4 = 1004 Bytes att2: 20 * 1 Byte

Re: [HACKERS] About b-tree usage

2005-03-08 Thread Ioannis Theoharis
let me, i have turned enable_seqscan to off, in order to discourage optimizer to choose seq_scan whenever an idex_scan can be used. But in this case, why optimizer don't chooses seq_scan (discourage is different than prevent) ? At many cases i need only a small fragment of raws to be retrieved.

Re: [HACKERS] About b-tree usage

2005-03-07 Thread Ioannis Theoharis
> If there are many identical values in att0, are you sure a sequential > scan isn't more efficient? Also, are you sure the index isn't working > well? It seems to me since you have the table clustered, it might be > fairly efficient as-is (it would get a huge benefit from the spatial > locality o

[HACKERS] About b-tree usage

2005-03-06 Thread Ioannis Theoharis
Please let me know, if there is any option in postgresql to achieve the following usage of a b-tree index: For a relation R(att0, att1) and a btree index on attribute att0 In each insertion of a tuple on table: - look on index if the value of att0 of new entry does already exist in index, and