Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5QzU-0007Ft-Lk for pgsql-docs@arkaria.postgresql.org; Mon, 19 Jul 2021 10:59:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m5QzT-0005aQ-CP for pgsql-docs@arkaria.postgresql.org; Mon, 19 Jul 2021 10:59:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5QzT-0005aI-6M for pgsql-docs@lists.postgresql.org; Mon, 19 Jul 2021 10:59:15 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m5QzQ-000701-P6 for pgsql-docs@postgresql.org; Mon, 19 Jul 2021 10:59:14 +0000 Received: by mail-wr1-x432.google.com with SMTP id k4so21460797wrc.8 for ; Mon, 19 Jul 2021 03:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=aCwDx7GllQR0jhlPMzwfwvT//Ym8YjEVCFmdUCYohi4=; b=LVdU4VVqpzGLJCjqnbbgoneCmX8XEDyaJtkX08gWizQQ+ar8xUduu0weSCoUErkKRG 97X2JS1/L/kLxieshSpAv2VyzGnFxugk7o2fH1+Oq7rLi0163bmnHPQgArsV11tTGlOW ck1JqBSxLOl+r1sWclP9FdPrO3m7c847Tfxif13MKydT2pMSZNBd15IncRy2KspI134/ S6W0Ow6AGB6q/8/MR6RIv+oieCYcxxwQj2fRRcXIrQI6Hnl/9qCMZwJ4Qdqid9PRbaWr b6zusWwQXDiIqnRnZvYoqmT6SxZ2oVHP8ek3d7Gbwa5A241VJjClVqKWAOBtjYW8IIEr jEXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=aCwDx7GllQR0jhlPMzwfwvT//Ym8YjEVCFmdUCYohi4=; b=LK+frWupOo0ZUYPcgEccLW2o9RpgIk/XoynDvgUFKmWwsLR7sNgeD4C1M6ysIisAJS OTYIKI34y74ib85h2r1XYJ/UNEKI09TBqH2a/AHqEVNngs6eItPk4FGS5NTmivwaX+1o X2aFbrqfotainchjs3JCgf7Dg+eU7pbjPr2iQOgOXSl47XL1xCBrqSTirapot2MjV1Bt EITiBlGmtXCq7bthd0IT9x3Y77bqp+suv+N9T/UK4+ZjmSm+wtxry/vEVa8Bo1go6+/W aIn7yb8X0Rdb6MMj54VIKQHPFVSlcveozEQ3huiplFdN/nqQoLS9rUKjVxWnapdZFXO/ v7Zg== X-Gm-Message-State: AOAM532mWifvBDHZpYSS9UaZ6d62TQmjk5Dp1m3e8xjP+NK29Sb0pchT MPVjI7/+UYXl7qfldIIvkaQvWQ== X-Google-Smtp-Source: ABdhPJzcJZL56nmZre8aWoYPb3j0+HCcPc/QGOaoPy14WbW77/f+VwbqPliB09kpXtEw9fqe6Frp1Q== X-Received: by 2002:adf:de84:: with SMTP id w4mr29024784wrl.104.1626692351455; Mon, 19 Jul 2021 03:59:11 -0700 (PDT) Received: from localhost.localdomain (217-149-171-226.nat.highway.telekom.at. [217.149.171.226]) by smtp.gmail.com with ESMTPSA id b15sm6798790wru.97.2021.07.19.03.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 03:59:11 -0700 (PDT) Message-ID: <77bbd451633a2852181fc6259baf9796361ce2a1.camel@cybertec.at> Subject: Re: Indexes on Expressions - a note to remind users to run ANALYZE after creation From: Laurenz Albe To: Nikolay Samokhvalov , PostgreSQL-documentation Date: Mon, 19 Jul 2021 12:59:10 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2021-07-16 at 22:00 -0700, Nikolay Samokhvalov wrote: > diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml > index 671299ff059d972ff95bdb1d67ed4c89bf5040b2..c7eaf9a608e995ef9957b4e0f677b36a8303be55 100644 > --- a/doc/src/sgml/indices.sgml > +++ b/doc/src/sgml/indices.sgml > @@ -741,6 +741,15 @@ CREATE INDEX people_names ON people ((first_name || ' ' || last_name)); > query. Thus, indexes on expressions are useful when retrieval speed > is more important than insertion and update speed. > > + > + > + Note > + > + Once an index on an expression is successfully created, it is important to > + run ANALYZE on the corresponding table to gather > + statistics for the expression. > + > + > I agree in principle. It should be "has been created" rather than "is created", and I would say something less drastic like "usually a good idea" rather than "important". Yours, Laurenz Albe