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 1tAqmT-000RTG-7T for pgsql-performance@arkaria.postgresql.org; Tue, 12 Nov 2024 13:18:04 +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 1tAqmP-006JWG-Ox for pgsql-performance@arkaria.postgresql.org; Tue, 12 Nov 2024 13:18:02 +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 1tAqmP-006JVn-EU for pgsql-performance@lists.postgresql.org; Tue, 12 Nov 2024 13:18:02 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tAqmM-001XhL-GE for pgsql-performance@lists.postgresql.org; Tue, 12 Nov 2024 13:18:01 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 6B18CC000C; Tue, 12 Nov 2024 13:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1731417478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XHViQA0/XJf3UTM5KiAbFCPSMvVVT93gOnIvvyXtsRY=; b=N16V1r3UklTF0a5szZDvtZMXZOAAivqHz/07Kby7VLJgh6pBQD+lv/y1d+MoJYk/EXfSWP IxRRW4rLDRRsOE1mQHtIXxScdZGX02zw0qINTUKTa+MmcR4izOUHXVx5cVTu3W6/IfdABp i+XGD2ey2J1k3UFBs482stGBEQtd/K/lks08AWT8q5nJjj1znjLbJYB+VmcJ609bLppg/x L+y2tHM1w4VReg0nCnTWapC3U1jqvLheSwg6XuGeB3xMsrxYiLCP+rVV1AJgCHLJL9zQy0 7/PcNbEcBcO8h7VDTcMQ+bxRfmBsXOAwZGyC6ASXDWBnwO5FmnEpA/28ugGSDg== Message-ID: <14f7d64f-d864-4429-9cf2-7ef92d6a90fb@vondra.me> Date: Tue, 12 Nov 2024 14:17:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: tds_fdw : Severe performance degradation from postgresql 10.23 to 16.4 To: Achilleas Mantzios - cloud , pgsql-performance@lists.postgresql.org References: <75b1aafc-bf5f-48fe-a495-fba11d8f0b05@vondra.me> <9640ce5b-3128-4c3c-b901-65747bc67b83@cloud.gatewaynet.com> <6797bc15-486b-48c3-9e89-cf85ae9a4043@vondra.me> Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-Sasl: tomas@vondra.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/12/24 11:37, Achilleas Mantzios - cloud wrote: > > ... > > We run perf on both systems for 90 seconds to make sure that it included > at least two runs of the slow system, and we attach both outputs. We run > perf as : > > sudo perf record -g -p -- sleep 90 > > it strikes me that we dont find similarities between the two, but we are > new to perf. > Not sure, but it seems the slow profile has a lot of writes. Not sure why. Do both instances have the same work_mem value / available memory, storatge? Maybe EXPLAIN VERBOSE would show if the remote query is the same ... Maybe try setting log_temp_files=0 before running the query. Writing the foreign scan result set into a temp file could be happening on one of the machines only. regards -- Tomas Vondra