X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E68C4D1B502 for ; Fri, 10 Oct 2003 16:42:48 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 53656-03 for ; Fri, 10 Oct 2003 13:42:00 -0300 (ADT) Received: from mta7.adelphia.net (mta7.adelphia.net [68.168.78.193]) by svr1.postgresql.org (Postfix) with ESMTP id B9D89D1B567 for ; Fri, 10 Oct 2003 13:41:48 -0300 (ADT) Received: from potentialtech.com ([68.68.113.33]) by mta7.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031010164150.VALY21600.mta7.adelphia.net@potentialtech.com>; Fri, 10 Oct 2003 12:41:50 -0400 Message-ID: <3F86E15C.1010309@potentialtech.com> Date: Fri, 10 Oct 2003 12:42:04 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-15?Q?Herv=E9_Piedvache?= Cc: Postgresql Performance Subject: Re: One or more processor ? References: <200310101830.49608.herve@elma.fr> In-Reply-To: <200310101830.49608.herve@elma.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/344 X-Sequence-Number: 4092 Hervé Piedvache wrote: > Hi, > > A simple question about PostgreSQL ... I have a Pentium Xeon Quadri processors > ... > If I do a SQL request ... does PostgreSQL use one or more processor ? PostgreSQL uses one processor per connection. If you have 4 simultaneous connections, you'll use all four processors (assuming your operating system is properly designed/configured). > And if it use only one ... why ? > Could you explain me this ;o) The answer to that is beyond my knowledge, but I have a few guesses: 1) Doing so is more complicated than you think. 2) The code was originally written for uniprocessor machines, and nobody has volunteered to update it yet. 3) kernel threading isn't as predictable as some people would like to think, thus they developers have avoided using it so far. 4) It simply isn't practical to expect a single query to execute on multiple processors simultaneously. Do you know of any RDBMS that actually will execute a single query on multiple processors? -- Bill Moran Potential Technologies http://www.potentialtech.com