Re: [GENERAL] LONG delete with LOTS of FK's

2013-05-17 Thread Larry Rosenman
Gavin Flower wrote: >On 18/05/13 03:06, Larry Rosenman wrote: >> On 2013-05-16 18:35, David Kerr wrote: >> >>> - I'll take a look tomorrow, but we WERE seeing Seq Scan's against >>> - multi-million >>> - row tables, so I suspect Tom is right on with the replanning >that's in >>> - 9.2 fixing >>> -

Re: [GENERAL] LONG delete with LOTS of FK's

2013-05-17 Thread Gavin Flower
On 18/05/13 03:06, Larry Rosenman wrote: On 2013-05-16 18:35, David Kerr wrote: - I'll take a look tomorrow, but we WERE seeing Seq Scan's against - multi-million - row tables, so I suspect Tom is right on with the replanning that's in - 9.2 fixing - it, and I'm in the process of validating tha

Re: [GENERAL] Tuning read ahead continued...

2013-05-17 Thread Ramsey Gurley
On May 16, 2013, at 5:56 PM, Ramsey Gurley wrote:Hi All,I tried bumping my read ahead up to 4096. Instead of having faster reads, it seems it actually slowed things down. In fact, most of the tuning suggestions I've tried have made little to no difference in the results I get from bonnie++.I've run

Re: [GENERAL] Comunication protocol

2013-05-17 Thread John R Pierce
On 5/17/2013 8:15 AM, Karel Riveron Escobar wrote: Thanks Tom for your response so fast. I'm reading right now and I found something but I didn't understood very well. In the documentation says that the protocol we're talking about is supported over TCP/IP family protocols, but doesn't says wha

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Jeff Amiel
- Original Message - From: Amit Langote To: Jeff Amiel Cc: "pgsql-general@postgresql.org" Sent: Friday, May 17, 2013 2:21 PM Subject: Re: [GENERAL] Why does row estimation on nested loop make no sense to me >> explain analyze >> select  era.child_entity  from entity_rel era  join u

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Amit Langote
>> explain analyze >> select era.child_entity from entity_rel era join user_entity ue on >> ue.entity_id = era.parent_entity and ue.user_id=12345 >> >> Nested Loop (cost=0.00..2903.37 rows=29107 width=4) (actual >> time=0.028..0.274 rows=201 loops=1) >> -> Index Only Scan using entity_pk o

Re: [GENERAL] Best practice on inherited tables

2013-05-17 Thread Alfonso Afonso
Hi Frank Although you are thinking in OOP, the SQL is itself one definition model that you should not ignore and, IMHO, try to follow the normalization statements. You can build a robust and normalized schema (table primarylocation , table secondlocation that have a idprimarylocation, etc.) and

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Jeff Amiel
> explain analyze > select  era.child_entity  from entity_rel era  join user_entity ue on > ue.entity_id = era.parent_entity and ue.user_id=12345 > > Nested Loop  (cost=0.00..2903.37 rows=29107 width=4) (actual > time=0.028..0.274 rows=201 loops=1) >  ->  Index Only Scan using entity_pk on u

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Achilleas Mantzios
That would be postgresql:5432/TCP On Παρ 17 Μαΐ 2013 10:54:02 Karel Riveron Escobar wrote: Hi everyone: I have a question. I think it's so simple to answer but I don't know anything about that. I want to know what is the comunication protocol among PostgreSQL database server and an applicatio

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Amit Langote
On Sat, May 18, 2013 at 1:47 AM, Jeff Amiel wrote: > > > > > - Original Message - > From: Amit Langote > To: Jeff Amiel > Cc: "pgsql-general@postgresql.org" > Sent: Friday, May 17, 2013 11:37 AM > Subject: Re: [GENERAL] Why does row estimation on nested loop make no sense > to me > > O

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Jeff Amiel
- Original Message - From: Amit Langote To: Jeff Amiel Cc: "pgsql-general@postgresql.org" Sent: Friday, May 17, 2013 11:37 AM Subject: Re: [GENERAL] Why does row estimation on nested loop make no sense to me On Sat, May 18, 2013 at 1:25 AM, Jeff Amiel wrote: > On most nested loops

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Jeff Amiel
> Can you provide a self-contained test case that does this? That response scares me. :) I can try - Every other table set (small, easy to experiment with)  returns results as expected - Is the implication that this looks 'unusual'? -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Amit Langote
On Sat, May 18, 2013 at 1:25 AM, Jeff Amiel wrote: > On most nested loops that I do explain/explain analyze on, the row estimation > for the nested-loop itself is a product of the inner nodes of the nested loop. > However in this case, I am stumped! > > explain > select era.child_entity from en

Re: [GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Tom Lane
Jeff Amiel writes: > How can the estimated number of rows for the nested loop node EXCEED the > product of the 2 row estimates of the tables being joined? > Not only does it exceed it - but it is orders of magnitude greater. Can you provide a self-contained test case that does this?

[GENERAL] Why does row estimation on nested loop make no sense to me

2013-05-17 Thread Jeff Amiel
On most nested loops that I do explain/explain analyze on, the row estimation for the nested-loop itself is a product of the inner nodes of the nested loop. However in this case, I am stumped! explain select  era.child_entity  from entity_rel era  join user_entity ue on ue.entity_id = era.paren

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Amit Langote
On Sat, May 18, 2013 at 1:03 AM, Karel Riveron Escobar wrote: > > Thanks Oscar. I'm going to try your suggestion but I get a problem. I get the > database server and apache server in the same PC because the system what I'm > building is in development phase. Do you think that is a problem for >

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Karel Riveron Escobar
Thanks Oscar. I'm going to try your suggestion but I get a problem. I get the database server and apache server in the same PC because the system what I'm building is in development phase. Do you think that is a problem for wireshark? Regards, Karel Riverón Student Scientific Council Informatics

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Oscar Calderon
Maybe you can use a software like Wireshark in your network and provoke a connection between your PostgreSQL server and Apache server, and when you see the results of traffic monitoring on Wireshark you can see more specific details about the protocol. Regards. *** Oscar

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Karel Riveron Escobar
Thanks Achilleas, I think the same, but I'm not sure. Saludos, Karel Riverón Consejo Científico Estudiantil Universidad de las Ciencias Informáticas - Original Message - | From: "Achilleas Mantzios" | To: pgsql-general@postgresql.org | Cc: "Karel Riveron Escobar" | Sent: Friday, May 17

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Karel Riveron Escobar
Thanks Tom for your response so fast. I'm reading r ight now and I found something but I didn't understood very well. In the documentation says that the protocol we're talking about is supported over TCP/IP family protocols, but doesn't says what exactly protocol is it? I want to know something

Re: [GENERAL] LONG delete with LOTS of FK's

2013-05-17 Thread Larry Rosenman
On 2013-05-16 18:35, David Kerr wrote: - I'll take a look tomorrow, but we WERE seeing Seq Scan's against - multi-million - row tables, so I suspect Tom is right on with the replanning that's in - 9.2 fixing - it, and I'm in the process of validating that. That seems likely, although you coul

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Achilleas Mantzios
That would be postgresql:5432/TCP On Παρ 17 Μαΐ 2013 10:54:02 Karel Riveron Escobar wrote: Hi everyone: I have a question. I think it's so simple to answer but I don't know anything about that. I want to know what is the comunication protocol among PostgreSQL database server and an applicatio

Re: [GENERAL] Comunication protocol

2013-05-17 Thread Tom Lane
Karel Riveron Escobar writes: > I have a question. I think it's so simple to answer but I don't know anything > about that. I want to know what is the comunication protocol among PostgreSQL > database server and an application server like Apache. I have to know that > because I'm designing a si

[GENERAL] Comunication protocol

2013-05-17 Thread Karel Riveron Escobar
Hi everyone: I have a question. I think it's so simple to answer but I don't know anything about that. I want to know what is the comunication protocol among PostgreSQL database server and an application server like Apache. I have to know that because I'm designing a simple deployment diagram

Re: [GENERAL] Best practice on inherited tables

2013-05-17 Thread Chris Travers
Just our experience in LedgerSMB On Fri, May 17, 2013 at 5:46 AM, Frank Lanitz wrote: > Hi folkes, > > I'm looking for a nice way to build this scenario: > I've got a lot of locations with some special types. For example I've > got workplaces, places like real laboratories and virtual places

[GENERAL] Best practice on inherited tables

2013-05-17 Thread Frank Lanitz
Hi folkes, I'm looking for a nice way to build this scenario: I've got a lot of locations with some special types. For example I've got workplaces, places like real laboratories and virtual places like maybe parcel service. For each of the different types I need to store some common attributes as

Re: [GENERAL] [HACKERS] PLJava for Postgres 9.2.

2013-05-17 Thread Cédric Villemain
> Yes, am aware PLJava is a 3rd party lib, just surprised the same party > hasn't built them given they seem to be built all the way to 9.1. > > My question was primarily about obtaining pgsx.mk file which is a part of > the PostgreSQL project. With linux you do something like that for pljava $

Re: [GENERAL] FATAL: database "a/system_data" does not exist

2013-05-17 Thread sumita
I found the configuration XML file which was creating the problem.By changing the database name , it solved the problem.Since there was also check-valid-connection-sql, it was happening at a particular frequency. Thanks all! -- View this message in context: http://postgresql.1045698.n5.nabble.

Re: [GENERAL] problem with lost connection while running long PL/R query

2013-05-17 Thread David M. Kaplan
Hi, Of course today after a reboot to update to the newest kernel, everything works without crashing... I imagine that yesterday the problem was that I had forgotten that I had a Windows virtual machine running on the server that was eating a good piece of memory. Still, using a cursor to p

Re: [GENERAL] problem with lost connection while running long PL/R query

2013-05-17 Thread David M. Kaplan
Hi Joe, Thanks for responding as you would clearly be the expert on this sort of problem. My current function does page through data using a cursor precisely to avoid out of memory problems, which is why I am somewhat surprised and stumped as to how this can be happening. It does return all

Re: [GENERAL] [HACKERS] PLJava for Postgres 9.2.

2013-05-17 Thread John R Pierce
On 5/16/2013 10:51 PM, Paul Hammond wrote: My question was primarily about obtaining pgsx.mk file which is a part of the PostgreSQL project. you need the whole PGXS subsystem, which the Windows version doesn't appear to be built with. thats a system for building compatible extensions. ahh

Re: [GENERAL] PLJava for Postgres 9.2.

2013-05-17 Thread Paul Hammond
Thx John. I had downloaded a prepackaged binary from here, I hadn't build it at all, I was only trying to build PlJava. I presume you mean building Postgres from the source in GIT will be required to get the pgxs sources installed that I require. Paul From: J

Re: [GENERAL] About replacing PostgreSQL instance

2013-05-17 Thread chiru r
Hi Oscar Calderon, Replacing instance is not good approach in major version (from PG9.1 to 9.3). Yes,your approach is correct it should be upgrade,since it is production need to take some extra care. On Thu, May 16, 2013 at 11:49 PM, Oscar Calderon < ocalde...@solucionesaplicativas.com> wrote:

Re: [GENERAL] PLJava for Postgres 9.2.

2013-05-17 Thread John R Pierce
On 5/16/2013 11:05 PM, Paul Hammond wrote: I had downloaded a prepackaged binary from here, I hadn't build it at all, I was only trying to build PlJava. I presume you mean building Postgres from the source in GIT will be required to get the pgxs sources installed that I require. cygwin isn'

Re: [GENERAL] [HACKERS] PLJava for Postgres 9.2.

2013-05-17 Thread Paul Hammond
Thx. Yes, am aware PLJava is a 3rd party lib, just surprised the same party hasn't built them given they seem to be built all the way to 9.1. My question was primarily about obtaining pgsx.mk file which is a part of the PostgreSQL project. Paul From: Andrew