Re: [GENERAL] Hot Standby has PANIC: WAL contains references to invalid pages

2013-02-17 Thread Michael Harris
Hi, >> Also, we can see that 9.2.3 has been released now and has a number of fixes >> relating to WAL replay, so we have decided to try again using that. >> We will scrub the standby and make a fresh copy using pg_basebackup. If that >> doesn't work then we may try using rsync instead. I am pl

Re: [GENERAL] Why is this a cross join?

2013-02-17 Thread John R Pierce
On 2/17/2013 2:09 PM, Tim Uckun wrote: Say I created new columns on both tables called "first_6" and populated them with the substrings. If I did a inner join or a left join on those fields would I still get a cross join? inner join model_configurations mc on mc.first_6 = crm.first_6 without

Re: [GENERAL] Why is this a cross join?

2013-02-17 Thread Tony Theodore
On 18/02/2013, at 9:09 AM, Tim Uckun wrote: >> >> In some way, every join is a cross join, with the results filtered according >> to the specificity of the join conditions. In this case: >> >> inner join model_configurations mc on left(crm.customer_class, 6) = >> left(mc.sap_code,6) >> >> "

Re: [GENERAL] Why is this a cross join?

2013-02-17 Thread Adrian Klaver
On 02/17/2013 02:09 PM, Tim Uckun wrote: In some way, every join is a cross join, with the results filtered according to the specificity of the join conditions. In this case: inner join model_configurations mc on left(crm.customer_class, 6) = left(mc.sap_code,6) "customer_class" sounds like

Re: [GENERAL] Why is this a cross join?

2013-02-17 Thread Tim Uckun
> > In some way, every join is a cross join, with the results filtered according > to the specificity of the join conditions. In this case: > > inner join model_configurations mc on left(crm.customer_class, 6) = > left(mc.sap_code,6) > > "customer_class" sounds like a fairly generic sort of field

Re: [GENERAL] Why is this a cross join?

2013-02-17 Thread Tony Theodore
On 18/02/2013, at 7:58 AM, Tim Uckun wrote: >> Apparently the first 6 characters of those fields are quite common, which >> gives you a result for every possible combination of the same 6-character >> value. > > > M. That seems kind of weird. Is there any way to NOT have this > be a cros

Re: [GENERAL] Why is this a cross join?

2013-02-17 Thread Tim Uckun
> Apparently the first 6 characters of those fields are quite common, which > gives you a result for every possible combination of the same 6-character > value. M. That seems kind of weird. Is there any way to NOT have this be a cross join? For example if I extracted the first six characte

Re: [GENERAL] Visual query builder for PosgreSQL?

2013-02-17 Thread Satoshi Nagayasu
2013/02/17 1:17, Thomas Kellerer wrote: Gauthier, Dave wrote on 16.02.2013 17:04: Many, many (many) years ago, while working at DIGITAL EQUIPMENT (before it bellied up), I worked with a relational DB they created called "RDB". RDB/VMS was actually the first relational database I ever worked wi

Re: [GENERAL] Why is this a cross join?

2013-02-17 Thread Alban Hertroys
On Feb 17, 2013, at 9:16, Tim Uckun wrote: > I have a seemingly simple query that returns way too many records. > Here is the count query > > select count(*) from ( >select crm.* >from sap_crm_sales crm > inner join model_configurations mc on left(crm.customer_class, 6) > = left(mc.s

[GENERAL] Why is this a cross join?

2013-02-17 Thread Tim Uckun
I have a seemingly simple query that returns way too many records. Here is the count query select count(*) from ( select crm.* from sap_crm_sales crm inner join model_configurations mc on left(crm.customer_class, 6) = left(mc.sap_code,6) ) as s The crm table has about 44K records, th

[GENERAL] Streaming replication and sharding

2013-02-17 Thread Tiemo Kieft
Hi, We are developing an application that uses various web analytics packages (like Google Analytics) to run analyses on. We are currently in closed beta stadium where we don't have a lot of data in the database, but at some point it will grow considerably. We basically have two different sets of