Re: [PERFORM] Which Join is better

2011-08-01 Thread Maria Arias de Reyna
El Martes 02 Agosto 2011, Adarsh Sharma escribió: > Dear all, > > Just want to know which join is better for querying data faster. > > I have 2 tables A ( 70 GB ) & B ( 7 MB ) > > A has 10 columns & B has 3 columns.Indexes exist on both tables's ids. > > select p.* from table A p, B q where p.i

Re: [PERFORM] Which Join is better

2011-08-01 Thread Szymon Guz
On 2 August 2011 08:42, Adarsh Sharma wrote: > Dear all, > > Just want to know which join is better for querying data faster. > > I have 2 tables A ( 70 GB ) & B ( 7 MB ) > > A has 10 columns & B has 3 columns.Indexes exist on both tables's ids. > > select p.* from table A p, B q where p.id=q.id

[PERFORM] Which Join is better

2011-08-01 Thread Adarsh Sharma
Dear all, Just want to know which join is better for querying data faster. I have 2 tables A ( 70 GB ) & B ( 7 MB ) A has 10 columns & B has 3 columns.Indexes exist on both tables's ids. select p.* from table A p, B q where p.id=q.id or select p.* from table B q , A p where q.id=p.id Thank

Re: [PERFORM] Parameters for PostgreSQL

2011-08-01 Thread Craig Ringer
On 1/08/2011 8:09 PM, Jayadevan M wrote: The machine configuration is Opteron 2CPU * 4cores @ 2.3GHz 16GB RAM OS Solaris10 x64 The most important spec has been omitted. What's the storage subsystem? For most database workloads that's *WAY* more important than the CPUs. It certainly will be

Re: [PERFORM] synchronous_commit off

2011-08-01 Thread Craig Ringer
On 2/08/2011 3:52 AM, Greg Smith wrote: On 08/01/2011 09:29 AM, Anibal David Acosta wrote: Can a transaction committed asynchronously report an error, duplicate key or something like that, causing a client with a OK transaction but server with a FAILED transaction. No. You are turning o

Re: [PERFORM] Parameters for PostgreSQL

2011-08-01 Thread Merlin Moncure
On Mon, Aug 1, 2011 at 7:09 AM, Jayadevan M wrote: > Hello all, > We are planning to test one of our products, which works with Oracle, on > PostgreSQL.  The database size is about 100 GB. It is a product with a > not-so-high load ( about 10 tps - mostly read). My doubts are about > PostgreSQL set

Re: [PERFORM] synchronous_commit off

2011-08-01 Thread Anibal David Acosta
the application doesn't manage money or something really really critical, so I can live with the "in case of crash" that is not a normal behavior J Thanks. De: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] En nombre de Greg Smith Enviado el:

Re: [PERFORM] synchronous_commit off

2011-08-01 Thread Greg Smith
On 08/01/2011 09:29 AM, Anibal David Acosta wrote: Can a transaction committed asynchronously report an error, duplicate key or something like that, causing a client with a OK transaction but server with a FAILED transaction. No. You are turning off the wait for the transaction to hit di

[PERFORM] synchronous_commit off

2011-08-01 Thread Anibal David Acosta
Can a transaction committed asynchronously report an error, duplicate key or something like that, causing a client with a OK transaction but server with a FAILED transaction. Thanks

Re: [PERFORM] insert

2011-08-01 Thread Kevin Grittner
Vitalii Tymchyshyn wrote: > Please note that in multitasking environment you may have problems > with your code. Two connections may check if "a" is available and > if not (and both got empty "select" result), try to insert. One > will succeed, another will fail if you have a unique constraint o

Re: [PERFORM] How to Speed up Insert from Multiple Connections

2011-08-01 Thread Kevin Grittner
Adarsh Sharma wrote: > By increasing shared_buffers,effective_cache_size ,work_mem, > maintainance etc , we can achieve performance in select queries. > > But In my application about 200 connections are made to DB server > and insert into 2 tables occured. > And it takes more than hours to com

[PERFORM] Parameters for PostgreSQL

2011-08-01 Thread Jayadevan M
Hello all, We are planning to test one of our products, which works with Oracle, on PostgreSQL. The database size is about 100 GB. It is a product with a not-so-high load ( about 10 tps - mostly read). My doubts are about PostgreSQL settings. For Oracle, we give about 4 GB SGA (shared buffer)

Re: [PERFORM] Performance die when COPYing to table with bigint PK

2011-08-01 Thread Vitalii Tymchyshyn
31.07.11 16:51, Robert Ayrapetyan написав(ла): Hello. I've found strange behavior of my pg installation (tested both 8.4 and 9.0 - they behave same) on FreeBSD platform. In short - when some table have PK on bigint field - COPY to that table from file becomes slower and slower as table grows. Wh

Re: [PERFORM] Performance die when COPYing to table with bigint PK

2011-08-01 Thread Simon Riggs
On Sun, Jul 31, 2011 at 2:51 PM, Robert Ayrapetyan wrote: > I've found strange behavior of my pg installation (tested both 8.4 and > 9.0 - they behave same) on FreeBSD platform. > In short - when some table have PK on bigint field - COPY to that > table from file becomes slower and slower as tabl

Re: [PERFORM] insert

2011-08-01 Thread Vitalii Tymchyshyn
Hello. Please note that in multitasking environment you may have problems with your code. Two connections may check if "a" is available and if not (and both got empty "select" result), try to insert. One will succeed, another will fail if you have a unique constraint on category name (and you

[PERFORM] How to Speed up Insert from Multiple Connections

2011-08-01 Thread Adarsh Sharma
Dear all, I research a lot on Postgresql Performance Tuning and find some parameters to increase the select performance in postgresql. By increasing shared_buffers,effective_cache_size ,work_mem, maintainance etc , we can achieve performance in select queries. But In my application about 200

Re: [PERFORM] Trigger or Function

2011-08-01 Thread Robert Klemme
On Sat, Jul 30, 2011 at 3:01 AM, Gavin Flower wrote: > On 24/07/11 03:58, alan wrote: >>> >>> My first approach would be to remove WeekAvg and MonthAvg from the >>> table and create a view which calculates appropriate values. >> >> Thanks Robert, I had to upgrade to 9.0.4 to use the extended windo