Re: [HACKERS] b-tree index search algorithms

2012-07-22 Thread Samuel Vogel
Am 20.07.12 01:40, schrieb Tom Lane: RelationGetDescr(rel)-attrs[n]-attbyval Thanks! Now does 'Relation' refer to the whole table or only the columns that are supposed to be scanned? So will RelationGetDescr(rel)-attrs[0] give me the description of the first column relevant to the current

Re: [HACKERS] b-tree index search algorithms

2012-07-19 Thread Samuel Vogel
Am 18.07.12 23:56, schrieb Tom Lane: Samuel Vogel s...@muel-vogel.de writes: How would the b-tree know exactly that a value is only a reference? And even in that case you say that it could get the bits, but make no use of it, since it does not know what they represent, right? It has access to

Re: [HACKERS] b-tree index search algorithms

2012-07-19 Thread Tom Lane
Samuel Vogel s...@muel-vogel.de writes: Am 18.07.12 23:56, schrieb Tom Lane: It has access to the data type's basic storage parameters, which are typbyval, typlen, and typalign; and we have standard conventions for identifying the length etc of variable-length values. It's just the meaning

Re: [HACKERS] b-tree index search algorithms

2012-07-18 Thread Samuel Vogel
Am 17.07.12 19:38, schrieb Tom Lane: btree knows nothing about the datatypes it's working on except that they have comparison functions. Converting the values to some sort of numeric scale that you can interpolate on seems logically dubious and fraught with practical difficulties. Now, we do

Re: [HACKERS] b-tree index search algorithms

2012-07-18 Thread Tom Lane
Samuel Vogel s...@muel-vogel.de writes: Am 17.07.12 19:38, schrieb Tom Lane: The datum values will be pointers to strings. I can simply dereference it and read all bytes until a null-byte appears (depending on the collation and that I know that it actually is a string)? We use a length word

Re: [HACKERS] b-tree index search algorithms

2012-07-17 Thread Samuel Vogel
Am 17.07.12 05:21, schrieb Tom Lane: Samuel Vogel s...@muel-vogel.de writes: I'm currently on a university research project if performance could be increased by substituting different inter-node search algorithms instead of the currently used binary search. Hm, what have you got in mind

Re: [HACKERS] b-tree index search algorithms

2012-07-17 Thread Tom Lane
Samuel Vogel s...@muel-vogel.de writes: Am 17.07.12 05:21, schrieb Tom Lane: Samuel Vogel s...@muel-vogel.de writes: I'm currently on a university research project if performance could be increased by substituting different inter-node search algorithms instead of the currently used binary

[HACKERS] b-tree index search algorithms

2012-07-16 Thread Samuel Vogel
Hello, I'm currently on a university research project if performance could be increased by substituting different inter-node search algorithms instead of the currently used binary search. But I'm having troubles understanding how the general b-tree implementation (nbtree.h) is used to

Re: [HACKERS] b-tree index search algorithms

2012-07-16 Thread Tom Lane
Samuel Vogel s...@muel-vogel.de writes: I'm currently on a university research project if performance could be increased by substituting different inter-node search algorithms instead of the currently used binary search. Hm, what have you got in mind exactly? But I'm having troubles