Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-24 Thread Phoenix Kiula
On Mon, Nov 21, 2011 at 6:14 PM, Tomas Vondra wrote: . >> >> An index on (a, b) can be used for queries involving only a but not for >> those involving only b. > > That is not true since 8.2 - a multi-column index may be used even for > queries without conditions on leading columns. It won't b

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-21 Thread Tomas Vondra
> On Nov 20, 2011, at 21:33, Phoenix Kiula wrote: > > My big table now has about 70 million rows, with the following columns: > > alias | character varying(35) > url | text > modify_date | timestamp without time zone > ip | bigint > > > For each IP addres

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-21 Thread Tomas Vondra
On 21 Listopad 2011, 4:17, David Johnston wrote: > On Nov 20, 2011, at 20:50, Phoenix Kiula wrote: > >> On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower >> wrote: >> >>> How about having 2 indexes: one on each of ip & url_md5? Pg will >>> combine the >>> indexes as required, or will just use one if

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Gavin Flower
On 21/11/11 14:50, Phoenix Kiula wrote: On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower wrote: How about having 2 indexes: one on each of ip& url_md5? Pg will combine the indexes as required, or will just use one if that is best. Thanks Gavin. Question: what if I have a joined index? If fro

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread David Johnston
On Nov 20, 2011, at 20:50, Phoenix Kiula wrote: > On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower > wrote: > >> How about having 2 indexes: one on each of ip & url_md5? Pg will combine the >> indexes as required, or will just use one if that is best. > > > > Thanks Gavin. Question: what if I h

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Ondrej Ivanič
Hi, On 21 November 2011 00:33, Phoenix Kiula wrote: > Hi. > > Want to start another thread, loosely related to the performance > problems thread I have going. > > Need some DB design guidance from the gurus here. > > My big table now has about 70 million rows, with the following columns: You can

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Phoenix Kiula
On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower wrote: > How about having 2 indexes: one on each of ip & url_md5? Pg will combine the > indexes as required, or will just use one if that is best. Thanks Gavin. Question: what if I have a joined index? If from a joined index I only use the first co

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Gavin Flower
On 21/11/11 02:33, Phoenix Kiula wrote: Hi. Want to start another thread, loosely related to the performance problems thread I have going. Need some DB design guidance from the gurus here. My big table now has about 70 million rows, with the following columns: alias | character v

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Adrian Klaver
On Sunday, November 20, 2011 7:12:59 am Phoenix Kiula wrote: > On Sun, Nov 20, 2011 at 9:33 PM, Phoenix Kiula wrote: > > I thought of adding a bigserial (serial8) column instead of > varchar(32) for the md5. But postgresql tells me that: > > -- > ERROR: type "bigserial" does not exist > -- >

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread David Johnston
On Nov 20, 2011, at 8:33, Phoenix Kiula wrote: > Hi. > > Want to start another thread, loosely related to the performance > problems thread I have going. > > Need some DB design guidance from the gurus here. > > My big table now has about 70 million rows, with the following columns: > > > al

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Gregg Jaskiewicz
partition your table if it is too big. -- 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] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Phoenix Kiula
On Sun, Nov 20, 2011 at 9:33 PM, Phoenix Kiula wrote: > Hi. > > Want to start another thread, loosely related to the performance > problems thread I have going. > > Need some DB design guidance from the gurus here. > > My big table now has about 70 million rows, with the following columns: > > >  

[GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Phoenix Kiula
Hi. Want to start another thread, loosely related to the performance problems thread I have going. Need some DB design guidance from the gurus here. My big table now has about 70 million rows, with the following columns: alias | character varying(35) url | text modify_