Re: [PERFORM] query a table with lots of coulmns

2014-09-20 Thread Björn Wittich
At first, thanks for your fast and comprehensive help. The structure of my cache table is a text , b text NOT NULL , c text , d text , e timestamp without timezone DEFAULT now(), f text, s1 integer DEFAULT 0, s2 integer DEFAULT 0, s3 integer DEFAULT 0, ... ,s512 DEFAULT 0 additional

Re: [PERFORM] query a table with lots of coulmns

2014-09-20 Thread Marc Mamin
At first, thanks for your fast and comprehensive help. The structure of my cache table is a text , b text NOT NULL , c text , d text , e timestamp without timezone DEFAULT now(), f text, s1 integer DEFAULT 0, s2 integer DEFAULT 0, s3 integer DEFAULT 0, ... ,s512 DEFAULT 0 additional

Re: [PERFORM] query a table with lots of coulmns

2014-09-20 Thread Björn Wittich
Hi, ok here are my schemata : cachetable : 30 - 50 Mio rows, worktable 5 Mio - 25 Mio CREATE TABLE cachetable ( a text, b text NOT NULL, c text, d text, e timestamp without time zone DEFAULT now(), f text, s1 integer DEFAULT 0, s2 integer DEFAULT 0, s3 integer DEFAULT 0,

[PERFORM] query a table with lots of coulmns

2014-09-19 Thread Björn Wittich
Hi mailing list, I am relatively new to postgres. I have a table with 500 coulmns and about 40 mio rows. I call this cache table where one column is a unique key (indexed) and the 499 columns (type integer) are some values belonging to this key. Now I have a second (temporary) table (only 2

Re: [PERFORM] query a table with lots of coulmns

2014-09-19 Thread Szymon Guz
On 19 September 2014 13:51, Björn Wittich bjoern_witt...@gmx.de wrote: Hi mailing list, I am relatively new to postgres. I have a table with 500 coulmns and about 40 mio rows. I call this cache table where one column is a unique key (indexed) and the 499 columns (type integer) are some

Re: [PERFORM] query a table with lots of coulmns

2014-09-19 Thread Björn Wittich
Hi Szymon, yes I have indexes on both columns (one in each table) which I am using for join operation. Am 19.09.2014 14:04, schrieb Szymon Guz: On 19 September 2014 13:51, Björn Wittich bjoern_witt...@gmx.de mailto:bjoern_witt...@gmx.de wrote: Hi mailing list, I am relatively

Re: [PERFORM] query a table with lots of coulmns

2014-09-19 Thread Pavel Stehule
2014-09-19 13:51 GMT+02:00 Björn Wittich bjoern_witt...@gmx.de: Hi mailing list, I am relatively new to postgres. I have a table with 500 coulmns and about 40 mio rows. I call this cache table where one column is a unique key (indexed) and the 499 columns (type integer) are some values

Re: [PERFORM] query a table with lots of coulmns

2014-09-19 Thread Josh Berkus
On 09/19/2014 04:51 AM, Björn Wittich wrote: I am relatively new to postgres. I have a table with 500 coulmns and about 40 mio rows. I call this cache table where one column is a unique key (indexed) and the 499 columns (type integer) are some values belonging to this key. Now I have a