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 1qeEN4-006Bit-Ro for psycopg@arkaria.postgresql.org; Thu, 07 Sep 2023 12:44: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 1qeEN2-001uci-Ou for psycopg@arkaria.postgresql.org; Thu, 07 Sep 2023 12:44: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 1qeEN2-001ucQ-Gg for psycopg@lists.postgresql.org; Thu, 07 Sep 2023 12:44:28 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qeEMy-003fqC-Rp for psycopg@postgresql.org; Thu, 07 Sep 2023 12:44:27 +0000 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-3ab244f2c89so618329b6e.3 for ; Thu, 07 Sep 2023 05:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694090663; x=1694695463; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=evIqVbczrI0giMqlTth+NQEaIt3a5LQEEBJ6cKrbYEo=; b=GSkD57RyEsxbnXaSX3p7C+35fqCUWyHOejePzn3fBKQFSZq4uCkX2JJLcyQE4kQYmJ tKNPOes5yd5HbRxdEtx/WQSsAXO6BMnkUx2OSOLajH7KxJy22BL8WA5mxJspGmwgx2QO 6+IPUM2UxaYKy0Q80tRRBbGJtQtwyzKNpy2nd7ygSAyXF79qREbIUKlQLFFWUvhkyhv0 WSfT1wqBEovPvtXGgy3vfFx8z58Csi7PrLzK7mYzNPjCNgsdf9DioXSPRIecKiOsAWTN lJWcoxHzyMCRjVOMk7rYvOfM9aFYwcqTflDH1DlMYH3MPkAoxMK3nwWYrkLG9gTXqZr3 PaCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694090663; x=1694695463; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=evIqVbczrI0giMqlTth+NQEaIt3a5LQEEBJ6cKrbYEo=; b=VPhqx3IkgnfDRBzEbO62wVc2+v2ouy70g+GqejYGnq7VtiqyuEnKVOCgGqr6j0VyE0 9TCJtO/N55WEafU34GOUPOaHcs2yvH/wjlX6SJGQCBgbn1k0gaWBS+Ty3y6qY7PHSi6K ijO/ctKm9zH1Jg8WJsEMD/6gj9wzi7uYq4x3Y/6wcGFk2tffAdGVr5AD2VmGMO3E73Bl dcOroF+q+Wvd7RocJtI9F9MK1SJZD4ITTG7O7W2MfoY75TMzRpBeB+sKaV0sapDSvrNN xLGGKIsnny+3vJgpK9ikP4tugtKsZ6osyBAiEVLyBYZ1K2BhNzf4PH3XQSRsGU2FsIRH WykQ== X-Gm-Message-State: AOJu0YwJEOG1HkUf+trCrer23a8Akn1ofAqf1MvWG5K9tB7IRhJrWez5 VIJxCO0g032Jp1Gk3mmOGclubbc0eq1RVe7XBQM= X-Google-Smtp-Source: AGHT+IHJ9oE4b5zcCL54hYBbjq54TARsGtkS2yZaPBNlmNTEXhATi8O1IjRCtil6mT4o1Scq6auzqL3zq+6MnGAn+Bc= X-Received: by 2002:a05:6808:218c:b0:3a4:225d:8135 with SMTP id be12-20020a056808218c00b003a4225d8135mr25311073oib.31.1694090662966; Thu, 07 Sep 2023 05:44:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Daniele Varrazzo Date: Thu, 7 Sep 2023 13:43:58 +0100 Message-ID: Subject: Re: CPU usage for queries, psycopg 2 vs 3 To: David Raymond Cc: "psycopg@postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 7 Sept 2023 at 13:17, David Raymond wrote: > > > Could you please be so kind as to repeat your tests with psycopg 3.1.4? > Tried with 3.1.4 and it has idle processor usage while waiting for the 8 results, just like psycopg2. > Tried with 3.1.5 and it spikes up to 62% reported CPU usage while waiting for the 8 results, just like the current release. Thank you, this gives a good indication about where to look. -- Daniele