Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcZny-0004xK-UA for pgsql-performance@arkaria.postgresql.org; Tue, 01 Aug 2017 16:13:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dcZny-0001nX-Gj for pgsql-performance@arkaria.postgresql.org; Tue, 01 Aug 2017 16:13:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dcZnv-0001dw-VA; Tue, 01 Aug 2017 16:13:56 +0000 Received: from mail-qt0-x22c.google.com ([2607:f8b0:400d:c0d::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dcZnp-0002AT-46; Tue, 01 Aug 2017 16:13:54 +0000 Received: by mail-qt0-x22c.google.com with SMTP id t37so11883700qtg.5; Tue, 01 Aug 2017 09:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1kRvSb81/fhIWgmokRGCkCJx7ZNt9B0Av70sIg9jP2g=; b=ScEApHW2RdhdnQ9nHinyiXiZgi9rDTdFAWWK3X5CIfmeiAyFyLynCY1jaejqxLz3jQ s23PDln9XsPsSBDyWEBFVJpvFd0WYuKqWXuod6KwJU9L+RMVfbTIhJT5f4VPwjrSbBe4 khT59Z9H669FPmfDIAfNmI5G8nGpRS0746PmeYJh3G/6MU3Ip63fOHun7xu6+B64rFv+ H6x4n/y2T9uOUpDwdjaKlx66Sraej2HttzLgOorGnLTe1/i5TbpV8dbmLpp7VQ+Cqdf6 Yhf4XqjtJTto9BOuqMPKuftSq983pgv41hnnEDqKXJVEP215KKQlv0BKccANmMUJ6vfh Jlzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1kRvSb81/fhIWgmokRGCkCJx7ZNt9B0Av70sIg9jP2g=; b=rm39xmM5AnRqZ2EbEc0H+NoiAddFoMT6SxI3AonFiJRKb+cZgBJSprv1obesOjTD+J jWV27MdL2TRmRqKzA1gvnGRf2dPyh2sj9EeOnGThxfXeceG7633ndqYG/senSPaPONQ1 PtkSQQRB2vTKNdn85ose5R+r8FZ2qlEqlC1nS/r/N6knFRW65T6GJTgvvMJtjlV0tV4n ASU4Sv4qZ+Z2AGYkHKmwfrTluPcy33XltrHK13fymO/yG6ea/oo9FkP/GsEUdqqNNkP6 RenCe8xoaJPpQgMvbCjRr0FooqLIZAqbVlrl8ppZDJVxLs5dKwLPeNR6BknHc9DWTm+M 865w== X-Gm-Message-State: AIVw112xmGv7UMtohYpElzORFzcpkWypP7GjNI4YlpO9qGXNqURNZMld jpkeOjFQkIW5EPBcRtDAo+kyX2DmTg== X-Received: by 10.200.8.232 with SMTP id y37mr26130860qth.329.1501604028131; Tue, 01 Aug 2017 09:13:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.104.11 with HTTP; Tue, 1 Aug 2017 09:13:47 -0700 (PDT) In-Reply-To: References: From: Scott Marlowe Date: Tue, 1 Aug 2017 09:13:47 -0700 Message-ID: Subject: Re: 2 server with same configuration but huge difference in performance To: Sumeet Shukla Cc: pgsql-admin , "pgsql-performance@postgresql.org" Content-Type: text/plain; charset="UTF-8" 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 On Tue, Aug 1, 2017 at 8:45 AM, Sumeet Shukla wrote: > It seems that it is happening because of the way the database is created. On > an old database it runs perfectly fine or if I use the old DB as template to > create the new one, it runs fine. But if I create a new DB with same > settings and permissions it hangs. I'm now trying to find the difference > between these 2 databases. Likely a difference in encoding or collation. What does \l show you (that's a lower case L btw) smarlowe=> \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+-------------+-------------+----------------------- postgres | smarlowe | UTF8 | en_US.UTF-8 | en_US.UTF-8 | smarlowe | smarlowe | UTF8 | en_US.UTF-8 | en_US.UTF-8 | UTF8 and en_US are much more expensive than SQL_ASCII and C would be for text and such. Basically indexes either don't work or work as well under en_US if you're comparing or sorting text. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance