Re: [GENERAL] How to raise index points when equal and like is used with gist ?

2012-10-12 Thread Condor
On 2012-10-12 01:14, Sergey Konoplev wrote: On Thu, Oct 11, 2012 at 2:23 AM, Condor con...@stz-bg.com wrote: explain analyze SELECT * FROM table WHERE phone LIKE '12%' AND firstname = 'OLEG' AND middlename || lastname LIKE '%KUZNICOV%IGORU%';

Re: [GENERAL] How to raise index points when equal and like is used with gist ?

2012-10-12 Thread Condor
On 2012-10-12 03:27, Tom Lane wrote: Condor con...@stz-bg.com writes: explain analyze SELECT * FROM table WHERE phone LIKE '12%' AND firstname = 'OLEG' AND middlename || lastname LIKE '%KUZNICOV%IGORU%'; QUERY PLAN

Re: [GENERAL] How to raise index points when equal and like is used with gist ?

2012-10-12 Thread Sergey Konoplev
On Fri, Oct 12, 2012 at 1:20 AM, Condor con...@stz-bg.com wrote: Even without tel filed result and type of scan is the same (Seq Scan). This is because your table has to few rows and it is easier to seq scan. Add more rows, eg. 100 000, then ANALYZE the table and run tests. Use random() and

Re: [GENERAL] Limit+Offset query wrong result in Postgres 9.0.3 ?

2012-10-12 Thread Albe Laurenz
urkpostenardr wrote: Is this bug in Postgres ? If yes, is it fixed in latest release ? Second query should return 2 rows instead of 1 ? create table t(i int); insert into t values(1); insert into t values(2); insert into t values(3); pgdb=# select i from t order by i limit

Re: [GENERAL] Limit+Offset query wrong result in Postgres 9.0.3 ?

2012-10-12 Thread Alban Hertroys
On 12 October 2012 04:55, urkpostenardr urkpostena...@gmail.com wrote: Hi, Is this bug in Postgres ? If yes, is it fixed in latest release ? Second query should return 2 rows instead of 1 ? create table t(i int); insert into t values(1); insert into t values(2); insert into t values(3);

[GENERAL] Strategies/Best Practises Handling Large Tables

2012-10-12 Thread Chitra Creta
Hi, I currently have a table that is growing very quickly - i.e 7 million records in 5 days. This table acts as a placeholder for statistics, and hence the records are merely inserted and never updated or deleted. Many queries are run on this table to obtain trend analysis. However, these

Re: [GENERAL] Strategies/Best Practises Handling Large Tables

2012-10-12 Thread Lonni J Friedman
On Fri, Oct 12, 2012 at 7:44 AM, Chitra Creta chitracr...@gmail.com wrote: Hi, I currently have a table that is growing very quickly - i.e 7 million records in 5 days. This table acts as a placeholder for statistics, and hence the records are merely inserted and never updated or deleted.

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-12 Thread Amitabh Kant
On Fri, Oct 12, 2012 at 7:45 AM, Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: Hi Friends, We have our production environment database server in Postgres 8.3 version. we have planned to upgrade to lastest version 9.1. Dump from 8.3 and restore in Postgres 9.1 takes more

Re: [GENERAL] Strategies/Best Practises Handling Large Tables

2012-10-12 Thread Ondrej Ivanič
Hi, On 13 October 2012 01:44, Chitra Creta chitracr...@gmail.com wrote: I currently have a table that is growing very quickly - i.e 7 million records in 5 days. This table acts as a placeholder for statistics, and hence the records are merely inserted and never updated or deleted. Many

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-12 Thread Steve Crawford
On 10/12/2012 08:05 AM, Amitabh Kant wrote: On Fri, Oct 12, 2012 at 7:45 AM, Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com mailto:nvishalak...@sirahu.com wrote: Hi Friends, We have our production environment database server in Postgres 8.3 version. we have planned to

Re: [GENERAL] Strategies/Best Practises Handling Large Tables

2012-10-12 Thread Ryan Kelly
On Sat, Oct 13, 2012 at 01:44:02AM +1100, Chitra Creta wrote: Hi, I currently have a table that is growing very quickly - i.e 7 million records in 5 days. This table acts as a placeholder for statistics, and hence the records are merely inserted and never updated or deleted. Many queries

[GENERAL] PostgreSQL and WMS

2012-10-12 Thread José Pedro Santos
Dear all, I would like to know if is possible set up a service (WMS/WFS) for a layer stored within Postgres. I have one WEBGIS application that can't connect to PostgreSQL but if I use the data inside Postgres I can get the URL from WMS and add the maps. Best Regards, José Santos

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-12 Thread Bruce Momjian
On Thu, Oct 11, 2012 at 07:38:07PM -0700, John R Pierce wrote: On 10/11/12 7:15 PM, Vishalakshi Navaneethakrishnan wrote: We have our production environment database server in Postgres 8.3 version. we have planned to upgrade to lastest version 9.1. Dump from 8.3 and restore in Postgres 9.1

Re: [GENERAL] Strategies/Best Practises Handling Large Tables

2012-10-12 Thread John R Pierce
On 10/12/12 7:44 AM, Chitra Creta wrote: 1. Purge old data 2. Reindex 3. Partition 4. Creation of daily, monthly, yearly summary tables that contains aggregated data specific to the statistics required if most of your queries read the majority of the tables, indexing will be of little

Re: [GENERAL] PostgreSQL and WMS

2012-10-12 Thread salah jubeh
yes , it is . i forget how to do it . you just need to a connection information in the wms configuration file From: José Pedro Santos zpsant...@hotmail.com To: Postgres Ajuda pgsql-general@postgresql.org Sent: Friday, October 12, 2012 5:46 PM Subject:

Re: [GENERAL] Limit+Offset query wrong result in Postgres 9.0.3 ?

2012-10-12 Thread Josh Kupershmidt
On Fri, Oct 12, 2012 at 3:33 AM, Alban Hertroys haram...@gmail.com wrote: On 12 October 2012 04:55, urkpostenardr urkpostena...@gmail.com wrote: Hi, Is this bug in Postgres ? If yes, is it fixed in latest release ? Second query should return 2 rows instead of 1 ? create table t(i int);

[GENERAL] tablespace_oid alias?

2012-10-12 Thread Thalis Kalfigkopoulos
Hi all, I want to get the databases that correspond to a certain tablespace through a call to pg_tablespace_databases(tablespace_oid) Which would be the OID alias type for tablespace_oid? I've tried: # select pg_tablespace_databases('pg_default'::XXX); with XXΧ as any of the OID aliases

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-12 Thread Scott Marlowe
On Thu, Oct 11, 2012 at 8:15 PM, Vishalakshi Navaneethakrishnan nvishalak...@sirahu.com wrote: Hi Friends, We have our production environment database server in Postgres 8.3 version. we have planned to upgrade to lastest version 9.1. Dump from 8.3 and restore in Postgres 9.1 takes more than

Re: [GENERAL] tablespace_oid alias?

2012-10-12 Thread Tom Lane
Thalis Kalfigkopoulos tkalf...@gmail.com writes: Which would be the OID alias type for tablespace_oid? There is none. Use select oid from pg_tablespace where spcname = 'whatever'. (In general, OID alias types only get invented for object types where the lookup rules are more complicated than

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-12 Thread Vishalakshi Navaneethakrishnan
Hi all, While testing upgrade facility, I have installed postgres 9.2 using source package. Because it needs to be compiled with --disable-integer-datetimes. I have used this command ./configure --prefix=/opt/PostgreSQL/9.2/ --disable-integer-datetimes --without-readline After installation

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-12 Thread John R Pierce
On 10/12/12 9:52 PM, Vishalakshi Navaneethakrishnan wrote: While testing upgrade facility, I have installed postgres 9.2 using source package. Because it needs to be compiled with --disable-integer-datetimes. I have used this command ./configure --prefix=/opt/PostgreSQL/9.2/