Re: [GENERAL] Inconsistency between PgAdmin III GUI and SQL window ?

2014-10-22 Thread Daniel Begin
David, Adrian, I am new to databases and since PgAdmin displays Catalogs, Event Triggers, Extensions and Schema as "Child" of the database, I assumed that Extensions were linked to a specific database, not to a specific schema. After reading your answers, I had another look at PostGIS extension p

[GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Postgres India
Hi, I am trying to connect DB2 from postgres using dblink, is there any configuration required at DB2 and postgres server. If any command string please provide it. Thanks Manmohan. K

Re: [GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Rémi Cura
Hey http://www.postgresql.org/docs/9.3/static/contrib-dblink-connect.html Seems dblink is for postgres to postgres connections. Cheers, Rémi-C 2014-10-22 12:45 GMT+02:00 Postgres India : > Hi, > I am trying to connect DB2 from postgres using dblink, is there any > configuration required at DB2 an

Re: [GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Rémi Cura
You may want to use foreign data wrapper (fdw) https://wiki.postgresql.org/wiki/Foreign_data_wrappers Cheers, Rémi-C 2014-10-22 12:50 GMT+02:00 Rémi Cura : > Hey > http://www.postgresql.org/docs/9.3/static/contrib-dblink-connect.html > Seems dblink is for postgres to postgres connections. > Che

Re: [GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Pavel Stehule
Hi try to use a Perl implementation https://github.com/davidfetter/DBI-Link There is a DBD driver for DB2 http://search.cpan.org/dist/DBD-DB2/DB2.pod Or you can use a mentioned fdw wrapper - there is ODBC wrapper https://wiki.postgresql.org/wiki/Foreign_data_wrappers#odbc_fdw and you can access

Re: [GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Merlin Moncure
On Wed, Oct 22, 2014 at 5:56 AM, Pavel Stehule wrote: > Hi > > try to use a Perl implementation https://github.com/davidfetter/DBI-Link > > There is a DBD driver for DB2 http://search.cpan.org/dist/DBD-DB2/DB2.pod > > Or you can use a mentioned fdw wrapper - there is ODBC wrapper > https://wiki.po

Re: [GENERAL] Inconsistency between PgAdmin III GUI and SQL window ?

2014-10-22 Thread Adrian Klaver
On 10/22/2014 03:25 AM, Daniel Begin wrote: David, Adrian, I am new to databases and since PgAdmin displays Catalogs, Event Triggers, Extensions and Schema as "Child" of the database, I assumed that Extensions were linked to a specific database, not to a specific schema. Yes and no. If they are

Re: [GENERAL] To increase RAM or not

2014-10-22 Thread Emanuel Calvo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 El 22/10/14 a las 02:37, Nikhil Daddikar escibió: > Folks, > > I have set about 12GB RAM (shared buffers) for our Postgresql > instance. How do I know if this is actually being used? And is > there a way to know by how much should I increase it,

Re: [GENERAL] To increase RAM or not

2014-10-22 Thread Igor Neyman
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Emanuel Calvo Sent: Wednesday, October 22, 2014 10:39 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] To increase RAM or not -BEGIN PGP SIGNED MESSAGE-

[GENERAL] Index scan vs indexonly scan method

2014-10-22 Thread Enrico Pirozzi
Hi, I was working on this simple query select field1 from table A where A.field2 <= some_value order by 1 desc limit some_value and I saw that: 1) the planner on this query uses an index only scan method: select field1 from table A where A.field2 <= '2014-08-13 10:20:59.99648+02' order by 1 de

Re: [GENERAL] Index scan vs indexonly scan method

2014-10-22 Thread Adrian Klaver
On 10/22/2014 08:18 AM, Enrico Pirozzi wrote: Hi, I was working on this simple query select field1 from table A where A.field2 <= some_value order by 1 desc limit some_value and I saw that: 1) the planner on this query uses an index only scan method: select field1 from table A where A.field2

Re: [GENERAL] Index scan vs indexonly scan method

2014-10-22 Thread Enrico Pirozzi
The background on index-only scans: https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.2#Index-only_scans In either case(index, index-only) the index has to be scanned. The difference is where the data is pulled from. In the index-only scan the query still needs to consult the

Re: [GENERAL] Function runtime increases after 5 calls in the same session.

2014-10-22 Thread Ilya Ashchepkov
Tom Lane Wrote in message: > Marti Raudsepp writes: >> On Tue, Oct 21, 2014 at 12:53 PM, Ilya I. Ashchepkov >> wrote: >>> I wrote a function and during testing it I came across the strange >>> behaviour. >>> Function runtime is about 200ms first 5 times, 6th and futher calls takes >>> ~22000 ms

Re: [GENERAL] Index scan vs indexonly scan method

2014-10-22 Thread Jeff Janes
On Wed, Oct 22, 2014 at 8:18 AM, Enrico Pirozzi wrote: > Hi, > I was working on this simple query > > select field1 from table A > where A.field2 <= some_value > order by 1 desc limit some_value > > and I saw that: > > 1) the planner on this query uses an index only scan method: > > select field1

Re: [GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Postgres India
Thanks a lot Remi, Merlin and Pavel...I will give it a try. On Wed, Oct 22, 2014 at 6:36 AM, Merlin Moncure wrote: > On Wed, Oct 22, 2014 at 5:56 AM, Pavel Stehule > wrote: > > Hi > > > > try to use a Perl implementation https://github.com/davidfetter/DBI-Link > > > > There is a DBD dri