Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rg6tx-004ELV-Gi for pgsql-admin@arkaria.postgresql.org; Fri, 01 Mar 2024 17:42:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rg6tw-00ELFZ-29 for pgsql-admin@arkaria.postgresql.org; Fri, 01 Mar 2024 17:42:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rg6tv-00ELFQ-KT for pgsql-admin@lists.postgresql.org; Fri, 01 Mar 2024 17:42:28 +0000 Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rg6ts-002HuY-Me for pgsql-admin@lists.postgresql.org; Fri, 01 Mar 2024 17:42:27 +0000 Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-607e54b6cf5so17035977b3.0 for ; Fri, 01 Mar 2024 09:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evaristesys-com.20230601.gappssmtp.com; s=20230601; t=1709314942; x=1709919742; darn=lists.postgresql.org; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=cI/8277JdEnvcJuu3WTM/df6qCPGPoiMIqvNUBLbALk=; b=F5T4UyWQfERWcXIPyzVQSJDGny5ilTNQZTeObBlEUoV/JUvqnSFkhdZOhovFfOow6y X1h3BhablCHegBAG+BzAVV6iqzPzzLc/nhIBvCErmS0Hh8MRvrmRBcC1hOWbz423vNBr 32C8JwYa/5J1H1ftqN3n/H4pOa6J+kflQsbuB0S7MhdnZ6aec43s2Yi+yieBaS/+43o7 wSXi9lD5i2mkIjB8W2iZGVS/QThGCH5v6x22sILHVN2Vi8sl6/MiJfRFNIJ4qPO3d03w UGdwOX7sfHew+mj10lv7GUuB+V8LOkXKXKupSnnaB2LNkSPtAB3xQggaeLvVoI37N+hT rLUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709314942; x=1709919742; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cI/8277JdEnvcJuu3WTM/df6qCPGPoiMIqvNUBLbALk=; b=QuYeoyWrbi6/0gkRjOe3GnuLXvx2tmsqq328uUxk3UlvuQtcxVFzOj//z2HOD67QgI QindW+68m0oSgfcpz7k8owwjahltO7mDBH9eXVAztsPdfalrqiqpTbod7Kq4x3RftLlI h9mh5c2F0R5cXHhlzRb3jTFZF4ocAteCRl1EdhkdwSQDryFyLf3oNWNS3FxS2bhmoSvl RM9tu1EpT4UxkdVV6TyASwpzmD0g+5E7LEul4cq/QcKeD2MJ6Ve83zXYIutkhj0a2y6p lj6qLXGBOCQwe+nj3AxZ5TM5ovMqnfkZUArE7BWz/lU30AiVex3USbHKrJvATf0kEIyQ CTRg== X-Gm-Message-State: AOJu0YxI6TXpoJeKF6wWh8T56xEtwIpUT71hnlIhgqZh/CunljRBABu8 5c3u5oxmJjmwqg/psZ3/5zko5XKpHirKy80LLDlDvenf66qxj/h6+gUFOIx4KFhWuDhU18KbFkC 6 X-Google-Smtp-Source: AGHT+IFEqkH4ehIgPGj6Wrr9i8vpUHwgf0ONr/Rd+vJieZqB9D/hbUkFzS2qgUhgv9UNTuCbYw+/KA== X-Received: by 2002:a0d:df8c:0:b0:609:852e:fe89 with SMTP id i134-20020a0ddf8c000000b00609852efe89mr1644870ywe.11.1709314942514; Fri, 01 Mar 2024 09:42:22 -0800 (PST) Received: from smtpclient.apple (99-97-91-220.lightspeed.tukrga.sbcglobal.net. [99.97.91.220]) by smtp.gmail.com with ESMTPSA id t125-20020a818383000000b005ff846d1f1dsm1053937ywf.134.2024.03.01.09.42.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2024 09:42:22 -0800 (PST) From: Alex Balashov Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: Missing indexes Date: Fri, 1 Mar 2024 12:42:11 -0500 References: <1883261458.1984.1709314823544.JavaMail.zextras@jpp.fr> To: pgsql-admin In-Reply-To: <1883261458.1984.1709314823544.JavaMail.zextras@jpp.fr> Message-Id: <8C52F074-25E7-4AA7-93C0-7606A1BA6F58@evaristesys.com> X-Mailer: Apple Mail (2.3774.400.31) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Well, you've come to the right place. This list loves "feelings-based" = diagnoses. :)=20 Two suggestions: 1) Turn on your "slow query log": ALTER SYSTEM SET log_min_duration_statement =3D 50; SELECT pg_reload_conf(); Then look at the Postgres log and see which statements may be running = slowly. 2) Have a look at `SELECT * FROM pg_stat_activity` and get your = bearings. -- Alex > On 1 Mar 2024, at 12:40, Jean-Paul POZZI wrote: >=20 > Hello, > Some examples of the "bad" sql text should be interesting ... > Regards >=20 > De: "Harish Harish" =20 > =C3=80: "undefined" =20 > Envoy=C3=A9: vendredi 1 mars 2024 17:39=20 > Objet: Missing indexes=20 >=20 > Dear Admins,=20 > I need help. We are on Postgres 10. and have a feeling there are = some indexes missing wich is causing performance issue > Please help me find the missing index within PostgreSQl 10. > Your timely help and support is much appreciated. > Best Regards, > Hari --=20 Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800