Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YfWhU-0005lz-KT for pgsql-performance@arkaria.postgresql.org; Tue, 07 Apr 2015 16:50:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YfWhU-0001kG-4G for pgsql-performance@arkaria.postgresql.org; Tue, 07 Apr 2015 16:50:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YfWhS-0001iy-QR for pgsql-performance@postgresql.org; Tue, 07 Apr 2015 16:50:07 +0000 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]) by makus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YfWhP-0007V7-7D for pgsql-performance@postgresql.org; Tue, 07 Apr 2015 16:50:04 +0000 Received: by wgin8 with SMTP id n8so62432644wgi.0 for ; Tue, 07 Apr 2015 09:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=QTV/66JzOdSA006dZKqblgi9YzsELMkQfWYYdcHm+t4=; b=PcdrGKGdNoLoQjFyUolBEOOi7Wej4DNeFyDsUK15HweSPQXTQbvuFDcRCHcZ5Ucid9 D8BiVRWOCSr3fQJyea8eQRt7aTna2ztuhqJfgFPEb3dVMvqaSjO45OLxyFGlGHHR9aZv gL1zbhLg4Op1tdRY5jDGBafjjunKh7918FH7gh/VSEn2TkA0NwJx3OEk4J0WQumsf4+f luC5qVni8+rqurtxin6u/g3TjuAYNhTWKiYvTX4FpExeLf5stc9k9BwKDBuk+VfkqDIE 5THhipozJ/XWqTFzEnm2+UMnoIlGg5eBornOnSzDf++hFzCZZTQTaTXKJ/wu4grFf8el oyDg== X-Received: by 10.194.60.203 with SMTP id j11mr42564989wjr.5.1428425401174; Tue, 07 Apr 2015 09:50:01 -0700 (PDT) Received: from [192.168.2.2] (2-230-140-245.ip202.fastwebnet.it. [2.230.140.245]) by mx.google.com with ESMTPSA id gt4sm11749856wib.21.2015.04.07.09.49.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 Apr 2015 09:50:00 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_FECCB45D-57A6-4B39-8FF5-671D830CE236" Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Can't get Dell PE T420 (Perc H710) perform better than a MacMini with PostgreSQL From: Pietro Pugni In-Reply-To: Date: Tue, 7 Apr 2015 18:49:58 +0200 Cc: PostgreSQL Performance Message-Id: <051212BE-A86B-4874-8BAC-18F609DE8229@gmail.com> References: <732B95A3-FEC8-4623-9AC5-98FD30F00863@gmail.com> <2F18FF84-5408-4AE8-9F2B-9110F76DED86@gmail.com> <5CC78F3A-8FD3-447F-8AB3-98BE80658E79@gmail.com> To: Jeff Janes X-Mailer: Apple Mail (2.1878.6) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --Apple-Mail=_FECCB45D-57A6-4B39-8FF5-671D830CE236 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 =09 > On Tue, Apr 7, 2015 at 6:27 AM, Pietro Pugni = wrote: > Hi Jeff, > sorry for the latency but server was down due to a error I made in the = sysctl.conf file. >> Yes, but are the defaults for those two systems? on psql, use \l to = see. >>=20 >=20 > \l returns the following: >=20 > T420 (Postgres 9.4.1) > List of databases > Name | Owner | Encoding | Collate | Ctype | = Access privileges =20 > = -----------+----------+----------+-------------+-------------+------------= ----------- > grep | grep | UTF8 | en_US.UTF-8 | en_US.UTF-8 |=20 > postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |=20 > template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | = =3Dc/postgres + > | | | | | = postgres=3DCTc/postgres > template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | = =3Dc/postgres + > | | | | | = postgres=3DCTc/postgres > (4 rows) >=20 >=20 >=20 > MacMini (Postgres 9.0.13) > List of databases > Name | Owner | Encoding | Collation | Ctype | = Access privileges =20 > = -------------------+------------+----------+-----------+-------+----------= --------------- > caldav | caldav | UTF8 | C | C |=20 > collab | collab | UTF8 | C | C |=20 > device_management | _devicemgr | UTF8 | C | C |=20 > pen | pen | UTF8 | C | C |=20 > postgres | _postgres | UTF8 | C | C |=20 > roundcubemail | roundcube | UTF8 | C | C |=20 > template0 | _postgres | UTF8 | C | C | = =3Dc/_postgres + > | | | | | = _postgres=3DCTc/_postgres > template1 | _postgres | UTF8 | C | C | = =3Dc/_postgres + > | | | | | = _postgres=3DCTc/_postgres > (8 rows) >=20 >=20 > The difference between the "C" and the "en_US" collation is entirely = sufficient to explain the difference in performance. "C" is the fastest = possible collation as it never needs to look ahead or consult tables, it = just compares raw bytes. >=20 > Cheers, >=20 > Jeff Hi Jeff, is there a way to set a default collection during compiling or in the = configuration file? I have never specified one, so I suppose that = somewhere on MacMini =93C=94 collation type is set as the default one. Thank you a lot. Best regards, Pietro= --Apple-Mail=_FECCB45D-57A6-4B39-8FF5-671D830CE236 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 =
On Tue, Apr = 7, 2015 at 6:27 AM, Pietro Pugni <pietro.pugni@gmail.com> wrote:
Hi= Jeff,
sorry for the latency but server was down due to a = error I made in the sysctl.conf file.

Yes, but are the defaults for those = two systems?  on psql, use \l to = see.

\l returns the = following:

T420 (Postgres = 9.4.1)
      =                     =         List of databases
   Name    |  Owner   | = Encoding |   Collate   |    Ctype    | =   Access privileges   
-----------+----------+----------+-------------+---------= ----+-----------------------
 grep      | grep     | = UTF8     | en_US.UTF-8 | en_US.UTF-8 = | 
 postgres  | = postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 = | 
 template0 | = postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =3Dc/postgres =          +
           |   =        |          |   =           |           =   | postgres=3DCTc/postgres
 template1 | postgres | UTF8     | = en_US.UTF-8 | en_US.UTF-8 | =3Dc/postgres         =  +
      =      |          |     =      |             |   =           | = postgres=3DCTc/postgres
(4 = rows)



=
MacMini (Postgres 9.0.13)
                =                     = List of databases
    =    Name        |   Owner   =  | Encoding | Collation | Ctype |    Access privileges =    
-------------------+------------+----------+-----------+-= ------+-------------------------
 caldav            | = caldav     | UTF8     | C       =   | C     | 
 collab            | = collab     | UTF8     | C       =   | C     | 
 device_management | _devicemgr | UTF8   =   | C         | C     = | 
 pen     =           | pen        | = UTF8     | C         | C     = | 
 postgres   =        | _postgres  | UTF8     | C =         | C     = | 
 roundcubemail =     | roundcube  | UTF8     | C     =     | C     | 
 template0         | _postgres =  | UTF8     | C         | C   =   | =3Dc/_postgres           = +
        =            |         =    |          |       =     |       | = _postgres=3DCTc/_postgres
 template1         | _postgres =  | UTF8     | C         | C   =   | =3Dc/_postgres           = +
        =            |         =    |          |       =     |       | = _postgres=3DCTc/_postgres
(8= rows)


The = difference between the "C" and the "en_US" collation is entirely = sufficient to explain the difference in performance.  "C" is the = fastest possible collation as it never needs to look ahead or consult = tables, it just compares raw bytes.

Cheers,

Jeff

Hi Jeff,
is there a way to set a = default collection during compiling or in the configuration file? I have = never specified one, so I suppose that somewhere on MacMini =93C=94 = collation type is set as the default one.

Thank = you a lot.
Best = regards,
 Pietro
= --Apple-Mail=_FECCB45D-57A6-4B39-8FF5-671D830CE236--