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 1ldwsF-0001Uv-7L for pgsql-performance@arkaria.postgresql.org; Tue, 04 May 2021 15:22:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ldwsD-0001AP-Tx for pgsql-performance@arkaria.postgresql.org; Tue, 04 May 2021 15:22:09 +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 1ldwsD-0001AH-H1 for pgsql-performance@lists.postgresql.org; Tue, 04 May 2021 15:22:09 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ldwsA-0003qp-JG for pgsql-performance@postgresql.org; Tue, 04 May 2021 15:22:08 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 4-20020a05600c26c4b0290146e1feccd8so1599410wmv.1 for ; Tue, 04 May 2021 08:22:06 -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:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=aREQafC3ZRzy5CnXO66/29poBPeP72O6omktH0iFW08=; b=bHYMhLHzBljO57gmRHhtslLN57ANY810qmeZaDr0HBZBHcNcVUJlKCj8/4yR+cklx7 Msh9oz/pnsbjEUGnC0dUHSY16h9Ce6rNfDBT0ErbjAJbIod9jVZtIAcb8VHWjRssrJKQ BdzPTl9HYepNRf6XU4wFF5ikwhBbOQbVaebMC1gjtmOA5eBVEn7fOWSatBkMvXJ91PLP gzb/etNEKkJmiBRHXuthwKPhQRM0AWIrww2WKIXqNCITbB1H2/pYCvnxpbEHDJkFSNx7 oMn6FcvbBnOZmvvjO8yn4YZvU7Uaeg9cwNgtE0CLptRrb1EEQ9CTX/XO4Wgc/al69Q2X 5wRQ== 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:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=aREQafC3ZRzy5CnXO66/29poBPeP72O6omktH0iFW08=; b=b+hbn6Rjm9rizQaGeIA19xhLht1qCa3kpss87CgwLddITqYMmARIJYbHi94CCds6jY x5yheIImoDMynUkSo7GGoTRagK6/tqSDGOkOY6C5mUhTkz4mEy7Va5bxkLkoM4KfcyiV sOCild5MgaFXPDPNGNTeH89Gp8hGfKcipTRzQvJTdfG0R0HKqR7ZZqGn3UzC2tEfIcZo cOwCC3q77Zd2T8Y3/lQTCuSe8vC74jcCpQhb3jlMNlp8iTcKPiaA+XQY89U8TiOSl1Rq EJgK0gfoih/YtU617coIScjOxFpIVGTmMArhS+GphgdSeMdtlZs9SET+6pthRdo6KPvX snrg== X-Gm-Message-State: AOAM533cwdeqJMVonn+QOcJaAqAWSFUy1tkRmwky8jEd3dQPa2JNLSC1 RkSiDQky96b1lz/IA3SYYGky7w== X-Google-Smtp-Source: ABdhPJyQTPjxyJWQ0wpYer5GOjXf3VQZxHGVJK00u0y8/2ydeSglAOMB3qC3B0C34BFqsW08+gRNfw== X-Received: by 2002:a1c:4c07:: with SMTP id z7mr27615290wmf.96.1620141725308; Tue, 04 May 2021 08:22:05 -0700 (PDT) Received: from localhost.localdomain (217-149-173-40.nat.highway.telekom.at. [217.149.173.40]) by smtp.gmail.com with ESMTPSA id l13sm2744683wmj.3.2021.05.04.08.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 08:22:05 -0700 (PDT) Message-ID: Subject: Re: 15x slower PreparedStatement vs raw query From: Laurenz Albe To: Alex , Rick Otten Cc: Justin Pryzby , "pgsql-performa." Date: Tue, 04 May 2021 17:22:04 +0200 In-Reply-To: <6cd0e931a59e1.4c58a67a1e5f6@yahoo.com> References: <3f8c88d8a6ef9.d82fa04cf610d.ref@yahoo.com> <3f8c88d8a6ef9.d82fa04cf610d@yahoo.com> <20210503201811.GA27406@telsasoft.com> <49daf090ac5b1.96e1ada6021ee@yahoo.com> <6cd0e931a59e1.4c58a67a1e5f6@yahoo.com> 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 Tue, 2021-05-04 at 13:59 +0000, Alex wrote: > "Powerful general purpose relational database" but not smart... Too smart can easily become slow... > I propose a feature to use information from previously executed queries to adjust the query plan time accordingly. > Reusing the same generic plan may and will lead to very long execution times. AI can go wrong too, and I personally would be worried that such cases are very hard to debug... Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com