Re: [HACKERS] On columnar storage (2)

2016-03-03 Thread Bert
Hey Alvaro, I was referring to https://wiki.postgresql.org/wiki/ColumnOrientedSTorage . and yes, I'll be at the next fosdem / pgconf.eu for sure. :-) Bert On Thu, Mar 3, 2016 at 3:40 PM, Alvaro Herrera wrote: > Bert wrote: > > > Alvaro, > > You wrote that a wiki page would be opened regarding

Re: [HACKERS] On columnar storage (2)

2016-03-03 Thread Alvaro Herrera
Haribabu Kommi wrote: > The performance report is taken on the patch that is WIP columnar storage > on PostgreSQL database. Only the storage part of the code is finished. > To test the performance, we used custom plan to generate the plans > where it can use the columnar storage. This way we ran t

Re: [HACKERS] On columnar storage (2)

2016-03-03 Thread Alvaro Herrera
Bert wrote: > Alvaro, > You wrote that a wiki page would be opened regarding this. But I still > cannot find such a page (expect for an old page which hasn't changed in the > last year). Is there already something we can look at? Yeah, I haven't done that yet. I will post here as soon as I get t

Re: [HACKERS] On columnar storage (2)

2016-03-03 Thread Haribabu Kommi
On Thu, Mar 3, 2016 at 7:46 PM, Bert wrote: > > Thank you for the performance test. But please not that the patch is 'thrown > away', and will be totally rewritten. I have no idea of the status of the > second / third attempt however. > However, what is interesting is that for some queries this pa

Re: [HACKERS] On columnar storage (2)

2016-03-03 Thread Bert
Hello Haribabu, Thank you for the performance test. But please not that the patch is 'thrown away', and will be totally rewritten. I have no idea of the status of the second / third attempt however. However, what is interesting is that for some queries this patch is already on par with VCI. Which

Re: [HACKERS] On columnar storage (2)

2016-03-02 Thread Haribabu Kommi
On Mon, Feb 1, 2016 at 12:11 AM, Alvaro Herrera wrote: > So we discussed some of this stuff during the developer meeting in > Brussels and the main conclusion is that we're going to split this up in > multiple independently useful pieces, and write up the general roadmap > in the wiki so that we c

Re: [HACKERS] On columnar storage (2)

2016-01-31 Thread Alvaro Herrera
So we discussed some of this stuff during the developer meeting in Brussels and the main conclusion is that we're going to split this up in multiple independently useful pieces, and write up the general roadmap in the wiki so that we can discuss in detail on-list. I'm marking this as Returned with

Re: [HACKERS] On columnar storage (2)

2016-01-06 Thread Robert Haas
On Mon, Dec 28, 2015 at 2:15 PM, Alvaro Herrera wrote: >> 1. CS API. >> I agree with you that FDW API seems to be not enough to efficiently support >> work with CS. >> At least we need batch insert. >> But may be it is better to extend FDW API rather than creating special API >> for CS? > > The pa

Re: [HACKERS] On columnar storage (2)

2015-12-29 Thread Jim Nasby
On 12/28/15 1:15 PM, Alvaro Herrera wrote: Currently within the executor a tuple is a TupleTableSlot which contains one Datum array, which has all the values coming out of the HeapTuple; but for split storage tuples, we will need to have a TupleTableSlot that has multiple "Datum arrays" (in a way

Re: [HACKERS] On columnar storage (2)

2015-12-28 Thread Alvaro Herrera
Konstantin Knizhnik wrote: > 3. Transpose of data and role of CS. > Let's look once again on Quote example above. Data is received in time > ascending order. But most queries require grouping it by symbol. So at some > stage we have to "transpose" data. To efficiently append data to timeseries >

Re: [HACKERS] On columnar storage (2)

2015-12-28 Thread Alvaro Herrera
Konstantin Knizhnik wrote: Hi, > May be you know, that I have implemented IMCS (in-memory-columnar-store) as > PostgreSQL extension. > It was not so successful, mostly because people prefer to use standard SQL > rather than using some special functions for accessing columnar storage > (CS). Now I

Re: [HACKERS] On columnar storage (2)

2015-12-23 Thread Konstantin Knizhnik
Hi Alvaro, May be you know, that I have implemented IMCS (in-memory-columnar-store) as PostgreSQL extension. It was not so successful, mostly because people prefer to use standard SQL rather than using some special functions for accessing columnar storage (CS). Now I am thinking about second r

Re: [HACKERS] On columnar storage (2)

2015-12-22 Thread Michael Paquier
On Tue, Dec 22, 2015 at 11:43 PM, Alvaro Herrera wrote: > Michael Paquier wrote: >> On Wed, Dec 9, 2015 at 3:10 PM, Jeff Janes wrote: >> > Could we get this rebased past the merge of the parallel execution commits? >> >> +1. Alvaro, Tomas, Simon, what are the next plans with those patches? > > Ye

Re: [HACKERS] On columnar storage (2)

2015-12-22 Thread Alvaro Herrera
Michael Paquier wrote: > On Wed, Dec 9, 2015 at 3:10 PM, Jeff Janes wrote: > > Could we get this rebased past the merge of the parallel execution commits? > > +1. Alvaro, Tomas, Simon, what are the next plans with those patches? Yeah, I've been working intermittently on getting the whole tree re

Re: [HACKERS] On columnar storage (2)

2015-12-22 Thread Michael Paquier
On Wed, Dec 9, 2015 at 3:10 PM, Jeff Janes wrote: > Could we get this rebased past the merge of the parallel execution commits? +1. Alvaro, Tomas, Simon, what are the next plans with those patches? -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make change

Re: [HACKERS] On columnar storage (2)

2015-12-08 Thread Jeff Janes
Could we get this rebased past the merge of the parallel execution commits? Thanks, Jeff -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] On columnar storage (2)

2015-10-21 Thread Haribabu Kommi
On Tue, Sep 1, 2015 at 8:53 AM, Alvaro Herrera wrote: > As discussed in > https://www.postgresql.org/message-id/20150611230316.gm133...@postgresql.org > we've been working on implementing columnar storage for Postgres. > Here's some initial code to show our general idea, and to gather > comments r

Re: [HACKERS] On columnar storage

2015-06-17 Thread Jim Nasby
On 6/17/15 2:04 PM, Alvaro Herrera wrote: Jim Nasby wrote: Related to idea of an 'auto join', I do wish we had the ability to access columns in a referenced FK table from a referring key; something like SELECT customer_id.first_name FROM invoice (which would be translated to SELECT first_name F

Re: [HACKERS] On columnar storage

2015-06-17 Thread Alvaro Herrera
Jim Nasby wrote: > Related to idea of an 'auto join', I do wish we had the ability to access > columns in a referenced FK table from a referring key; something like SELECT > customer_id.first_name FROM invoice (which would be translated to SELECT > first_name FROM invoice JOIN customer USING( cust

Re: [HACKERS] On columnar storage

2015-06-15 Thread Jim Nasby
On 6/14/15 10:22 AM, Alvaro Herrera wrote: >To me, it feels like there are two different features here that would >be better separated. First, there's the idea of having a table that >gets auto-joined to other tables whenever you access it, so that the >user sees one really wide table but really

Re: [HACKERS] On columnar storage

2015-06-15 Thread CK Tan
http://vldb.org/pvldb/vol5/p1790_andrewlamb_vldb2012.pdf In sketch: There is the concept of a Write-Optimized-Store (WOS) and Read-optimized-store (ROS), and a TupleMover that moves records from WOS to ROS (some what like vacuum), and from ROS to WOS for updates. It seems to me that heap is natur

Re: [HACKERS] On columnar storage

2015-06-15 Thread Amit Kapila
On Fri, Jun 12, 2015 at 10:58 PM, Alvaro Herrera wrote: > > Amit Kapila wrote: > > On Fri, Jun 12, 2015 at 4:33 AM, Alvaro Herrera < alvhe...@2ndquadrant.com> > > wrote: > > > One critical detail is what will be used to identify a heap row when > > > talking to a CS implementation. There are two

Re: [HACKERS] On columnar storage

2015-06-14 Thread Michael Nolan
On Sun, Jun 14, 2015 at 10:30 AM, Tomas Vondra wrote: > >> Are you looking to avoid all hardware-based limits, or would using a 64 >> bit row pointer be possible? That would give you 2^64 or 1.8 E19 unique >> rows over whatever granularity/uniqueness you use (per table, per >> database, etc.)

Re: [HACKERS] On columnar storage

2015-06-14 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> Alvaro Herrera writes: > >>> Won't this cause issues to MergeAppend optimizations? > > >> Like what? > > > Well, as I understand, MergeAppend needs to know the sort order of the > > child node, right? But that's available only o

Re: [HACKERS] On columnar storage

2015-06-14 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Alvaro Herrera writes: >>> Won't this cause issues to MergeAppend optimizations? >> Like what? > Well, as I understand, MergeAppend needs to know the sort order of the > child node, right? But that's available only on the relation RTE, not > on the c

Re: [HACKERS] On columnar storage

2015-06-14 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> Actually ... if you intend to allow column storage to work with inherited > >> tables (and if you don't, you'd better have a darn good reason why not), > >> I think you probably want to do this join insertion *after* inheritance > >

Re: [HACKERS] On columnar storage

2015-06-14 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Actually ... if you intend to allow column storage to work with inherited >> tables (and if you don't, you'd better have a darn good reason why not), >> I think you probably want to do this join insertion *after* inheritance >> expansion, so you can join

Re: [HACKERS] On columnar storage

2015-06-14 Thread Alvaro Herrera
Tom Lane wrote: > I wrote: > > Another model that could be followed is expansion of inheritance-tree > > references, which happens early in the planner. > > Actually ... if you intend to allow column storage to work with inherited > tables (and if you don't, you'd better have a darn good reason wh

Re: [HACKERS] On columnar storage

2015-06-14 Thread Tom Lane
Alvaro Herrera writes: > Another choice I considered was subquery_planner: in the spot where > expand_inherited_tables() is called, add a new call to expand the RTEs > that correspond to tables containing stores. But I had second thoughts > because that function says "it's safe because it only ad

Re: [HACKERS] On columnar storage

2015-06-14 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-06-11 20:03:16 -0300, Alvaro Herrera wrote: > > Rewriter > > > > Parsing occurs as currently. During query rewrite, specifically at the > > bottom of the per-relation loop in fireRIRrules(), we will modify the > > query tree: each relation RTE containing a colstore

Re: [HACKERS] On columnar storage

2015-06-14 Thread Tom Lane
I wrote: > Another model that could be followed is expansion of inheritance-tree > references, which happens early in the planner. Actually ... if you intend to allow column storage to work with inherited tables (and if you don't, you'd better have a darn good reason why not), I think you probably

Re: [HACKERS] On columnar storage

2015-06-14 Thread Tom Lane
Andres Freund writes: > On 2015-06-11 20:03:16 -0300, Alvaro Herrera wrote: >> Parsing occurs as currently. During query rewrite, specifically at the >> bottom of the per-relation loop in fireRIRrules(), we will modify the >> query tree: each relation RTE containing a colstore will be replaced >>

Re: [HACKERS] On columnar storage

2015-06-14 Thread Andres Freund
On 2015-06-11 20:03:16 -0300, Alvaro Herrera wrote: > Rewriter > > Parsing occurs as currently. During query rewrite, specifically at the > bottom of the per-relation loop in fireRIRrules(), we will modify the > query tree: each relation RTE containing a colstore will be replaced > with a JoinExp

Re: [HACKERS] On columnar storage

2015-06-14 Thread Petr Jelinek
On 2015-06-14 17:36, Tomas Vondra wrote: On 06/14/15 17:22, Alvaro Herrera wrote: Robert Haas wrote: ,,, Second, there's the idea of a way of storing tuples that is different from PostgreSQL's usual mechanism - i.e. a storage manager API. I understand your concerns about going through the FDW

Re: [HACKERS] On columnar storage

2015-06-14 Thread Tomas Vondra
On 06/14/15 17:22, Alvaro Herrera wrote: Robert Haas wrote: ,,, Second, there's the idea of a way of storing tuples that is different from PostgreSQL's usual mechanism - i.e. a storage manager API. I understand your concerns about going through the FDW API so maybe that's not the right way to

Re: [HACKERS] On columnar storage

2015-06-14 Thread Tomas Vondra
Hi, On 06/13/15 00:07, Michael Nolan wrote: On Thu, Jun 11, 2015 at 7:03 PM, Alvaro Herrera mailto:alvhe...@2ndquadrant.com>> wrote: We hope to have a chance to discuss this during the upcoming developer unconference in Ottawa. Here are some preliminary ideas to shed some light o

Re: [HACKERS] On columnar storage

2015-06-14 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Jun 11, 2015 at 7:03 PM, Alvaro Herrera > wrote: > > I've been trying to figure out a plan to enable native column stores > > (CS or "colstore") for Postgres. Motivations: > > > > * avoid the 32 TB limit for tables > > * avoid the 1600 column limit for tables > > * in

Re: [HACKERS] On columnar storage

2015-06-14 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Amit Kapila wrote: > >> Will the column store obey snapshot model similar to current heap tuples, > >> if so will it derive the transaction information from heap tuple? > > > Yes, visibility will be tied to the heap tuple -- a value is accessed > > onl

Re: [HACKERS] On columnar storage

2015-06-13 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> I can't help thinking that this could tie in with the storage level API >> that I was waving my arms about last year. Or maybe not --- the goals >> are substantially different --- but I think we ought to reflect on that >> rather than just doing a narro

Re: [HACKERS] On columnar storage

2015-06-13 Thread Alvaro Herrera
Tom Lane wrote: > I can't help thinking that this could tie in with the storage level API > that I was waving my arms about last year. Or maybe not --- the goals > are substantially different --- but I think we ought to reflect on that > rather than just doing a narrow hack for column stores used

Re: [HACKERS] On columnar storage

2015-06-12 Thread Michael Nolan
On Thu, Jun 11, 2015 at 7:03 PM, Alvaro Herrera wrote: > We hope to have a chance to discuss this during the upcoming developer > unconference in Ottawa. Here are some preliminary ideas to shed some > light on what we're trying to do. > > > I've been trying to figure out a plan to enable native

Re: [HACKERS] On columnar storage

2015-06-12 Thread Alvaro Herrera
Merlin Moncure wrote: > On Thu, Jun 11, 2015 at 6:03 PM, Alvaro Herrera > wrote: > > We hope to have a chance to discuss this during the upcoming developer > > unconference in Ottawa. Here are some preliminary ideas to shed some > > light on what we're trying to do. > > Quick thought. We alread

Re: [HACKERS] On columnar storage

2015-06-12 Thread Tomas Vondra
Hi, On 06/12/15 15:56, Merlin Moncure wrote: On Thu, Jun 11, 2015 at 6:03 PM, Alvaro Herrera wrote: We hope to have a chance to discuss this during the upcoming developer unconference in Ottawa. Here are some preliminary ideas to shed some light on what we're trying to do. Quick thought. We

Re: [HACKERS] On columnar storage

2015-06-12 Thread Tom Lane
Alvaro Herrera writes: > Amit Kapila wrote: >> Will the column store obey snapshot model similar to current heap tuples, >> if so will it derive the transaction information from heap tuple? > Yes, visibility will be tied to the heap tuple -- a value is accessed > only when its corresponding heap

Re: [HACKERS] On columnar storage

2015-06-12 Thread Alvaro Herrera
Amit Kapila wrote: > On Fri, Jun 12, 2015 at 4:33 AM, Alvaro Herrera > wrote: > > There are several parts to this: > > > > 1. the CSM API > > 2. Cataloguing column stores > > 3. Query processing: rewriter, optimizer, executor > > > > I think another important point is about the format of column

Re: [HACKERS] On columnar storage

2015-06-12 Thread Merlin Moncure
On Thu, Jun 11, 2015 at 6:03 PM, Alvaro Herrera wrote: > We hope to have a chance to discuss this during the upcoming developer > unconference in Ottawa. Here are some preliminary ideas to shed some > light on what we're trying to do. Quick thought. We already support out of line columnar stora

Re: [HACKERS] On columnar storage

2015-06-12 Thread Robert Haas
On Thu, Jun 11, 2015 at 7:03 PM, Alvaro Herrera wrote: > I've been trying to figure out a plan to enable native column stores > (CS or "colstore") for Postgres. Motivations: > > * avoid the 32 TB limit for tables > * avoid the 1600 column limit for tables > * increased performance To me, it feel

Re: [HACKERS] On columnar storage

2015-06-11 Thread Amit Kapila
On Fri, Jun 12, 2015 at 4:33 AM, Alvaro Herrera wrote: > > We hope to have a chance to discuss this during the upcoming developer > unconference in Ottawa. Here are some preliminary ideas to shed some > light on what we're trying to do. > > > I've been trying to figure out a plan to enable native

Re: [HACKERS] On columnar storage

2015-06-11 Thread Stephen Frost
Josh, * Josh Berkus (j...@agliodbs.com) wrote: > On 06/11/2015 04:03 PM, Alvaro Herrera wrote: > > We hope to have a chance to discuss this during the upcoming developer > > unconference in Ottawa. Here are some preliminary ideas to shed some > > light on what we're trying to do. > > Added to: >

Re: [HACKERS] On columnar storage

2015-06-11 Thread Josh Berkus
On 06/11/2015 04:03 PM, Alvaro Herrera wrote: > We hope to have a chance to discuss this during the upcoming developer > unconference in Ottawa. Here are some preliminary ideas to shed some > light on what we're trying to do. Added to: https://wiki.postgresql.org/wiki/PgCon_2015_Developer_Unconfe

Re: [HACKERS] On columnar storage

2015-06-11 Thread Qingqing Zhou
On Thu, Jun 11, 2015 at 4:03 PM, Alvaro Herrera wrote: > I've been trying to figure out a plan to enable native column stores > (CS or "colstore") for Postgres. Motivations: > > * avoid the 32 TB limit for tables > * avoid the 1600 column limit for tables > * increased performance > And better co

[HACKERS] On columnar storage

2015-06-11 Thread Alvaro Herrera
We hope to have a chance to discuss this during the upcoming developer unconference in Ottawa. Here are some preliminary ideas to shed some light on what we're trying to do. I've been trying to figure out a plan to enable native column stores (CS or "colstore") for Postgres. Motivations: * avo