Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eoWq8-0008Eq-4p for pgsql-general@arkaria.postgresql.org; Wed, 21 Feb 2018 16:01:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoWq7-00081o-6k for pgsql-general@arkaria.postgresql.org; Wed, 21 Feb 2018 16:01:51 +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 1eoWq6-00081b-Iu for pgsql-general@lists.postgresql.org; Wed, 21 Feb 2018 16:01:51 +0000 Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eoWq2-0005bA-6X for pgsql-general@postgresql.org; Wed, 21 Feb 2018 16:01:49 +0000 Received: by mail-wr0-x22b.google.com with SMTP id p104so5886776wrc.12 for ; Wed, 21 Feb 2018 08:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avbrief-com.20150623.gappssmtp.com; s=20150623; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :references:in-reply-to:mime-version; bh=+58XDMGjFf3Rw6YnUOeo8i9roP2TRi2cLjkCp/wq8Os=; b=Nh0VPTyoySd2/Qu22ZB5NKd8EMytHy3or4fHfXIuFhxMjCNnjTFw71usyeaELL6RPi G/zkWYx60/bYUeh5FIM2wtfP6PYA9G10EP9EAj+KOpaJbfst4mNBrGUdNiSykPKTiPX1 4ipZ2Cz3Es9zcIS6fJG5nQih5kTqLRByKrP8huaFgKfk+wQgV9old6XU3berSGMEpVml a55LbeP6xMJunButkuiJBO2uFcCEIlVaEztjz9AnULze7ttdO/jbeYH9j9uEEs/10uX1 hycdUTG9NeYvaMmYhdyLgFisGbn3f6ttCKoq6yEm8MiXY29+WQ2gcTloejhxF4WPxbpj zCgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:date:subject:from:to:cc:message-id :thread-topic:references:in-reply-to:mime-version; bh=+58XDMGjFf3Rw6YnUOeo8i9roP2TRi2cLjkCp/wq8Os=; b=De+F5FpNbBUBX6TB9ACUdt+Ot7iY/NWoFmPN/y4XC4aLZkl68wZsmGspN7vMF60n3Z X8VmYJ7wxIMwWx37fT6UxxEFmHYGGOb+/rJAXJ6nqjONEZWDMMRo1l0fXK+OGjeZGK/w ByfHKqLpxjFYUtU4OcQQytsKnNEmFu/SI+FlFepVov15Biq2WLrX9gDAGTRg38H+gjp9 g9/muGd2+P5g4NkOPRyOuyPYMG0TlhgRUDdJ1BvrbXhO+fXdm/vr9YpHoGERguTiBwRZ cGUhWcaQP0Yxg9vmnhJPBXWN6VrPDfRkuD1aEFLIl331xvuOfPCrT/ApfeKEF70wH2aj 00zA== X-Gm-Message-State: APf1xPBLijPzTBghKrefgdu7bmLKTPJBhG6WnP53aDIbn1/oW3rb9BXP 1Kq+ezvTMaJLgw5YiKWmppBEYQ== X-Google-Smtp-Source: AH8x226Da7ZEvZIYkhaZV7BCjdLcTarOJKRDZ7YjfjEspzGppvd6aPOxlnmSID5F7i6LxUP9R4f8sg== X-Received: by 10.80.230.12 with SMTP id y12mr5285779edm.203.1519228904317; Wed, 21 Feb 2018 08:01:44 -0800 (PST) Received: from [192.168.0.204] (cpc134188-nail4-2-0-cust164.know.cable.virginm.net. [77.99.14.165]) by smtp.gmail.com with ESMTPSA id r23sm17360285edb.77.2018.02.21.08.01.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 08:01:43 -0800 (PST) User-Agent: Microsoft-MacOutlook/10.a.0.180210 Date: Wed, 21 Feb 2018 16:01:41 +0000 Subject: Re: Not sure if I should CREATE INDEX for text columns on which I plan to filter later From: Martin Moore To: Alexander Farber CC: pgsql-general Message-ID: Thread-Topic: Not sure if I should CREATE INDEX for text columns on which I plan to filter later References: In-Reply-To: Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3602073703_596852396" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3602073703_596852396 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable My point was that your explain would be the same with indexes as without as= they won=E2=80=99t be used. =20 Martin. =20 From: Alexander Farber Date: Wednesday, 21 February 2018 at 12:33 Cc: pgsql-general Subject: Re: Not sure if I should CREATE INDEX for text columns on which I = plan to filter later =20 Hi Martin - =20 On Wed, Feb 21, 2018 at 1:26 PM, Martin Moore wr= ote: I=E2=80=99m no expert but I=E2=80=99d think it unlikely an index would be considered fo= r a table with only 100 rows in. Also I=E2=80=99m pretty sure only one index per t= able is used, so you=E2=80=99d want to put state1 and state2 in one index. =20 I hope to have more records in the words_games table later when my game is = launched (currently in soft launch/beta).....=20 Regards Alex=20 --B_3602073703_596852396 Content-type: text/html; charset="UTF-8" Content-transfer-encoding: quoted-printable

My point = was that your explain would be the same with indexes as without as they won=E2= =80=99t be used.

 

Martin.

 

From: Alexander Farber <alexa= nder.farber@gmail.com>
Date: Wednesday, 21 February 2018 at 12:= 33
Cc: pgsql-general <pgsql-general@postgresql.org>
Su= bject: Re: Not sure if I should CREATE INDEX for text columns on which I= plan to filter later

 

= Hi Martin -

 

<= span style=3D'mso-bookmark:_MailOriginalBody'>On Wed, Feb 21, 2018 at 1:26 PM,= Martin Moore <martin.moore@avbrief.com= > wrote:

I=E2=80=99m no expert but I=E2=80=99d think it unlikely an index woul= d be considered for a table with only 100 rows in. Also I=E2=80=99m pretty sure on= ly one index per table is used, so you=E2=80=99d want to put state1 and state2 in = one index.

 

I hope to have more records in the words_games= table later when my game is launched (currently in soft launch/beta)..... <= o:p>

Regards

Alex

<= /div>
--B_3602073703_596852396--