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 1s9nuS-005G5d-8A for pgsql-hackers@arkaria.postgresql.org; Wed, 22 May 2024 15:29:46 +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 1s9nuR-000Zfi-Oq for pgsql-hackers@arkaria.postgresql.org; Wed, 22 May 2024 15:29:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9nuR-000ZfW-Bb for pgsql-hackers@lists.postgresql.org; Wed, 22 May 2024 15:29:43 +0000 Received: from lahtoruutu.iki.fi ([185.185.170.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9nuO-001TK4-98 for pgsql-hackers@postgresql.org; Wed, 22 May 2024 15:29:42 +0000 Received: from [192.168.4.196] (mobile-access-b04823-87.dhcp.inet.fi [176.72.35.87]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4VkwG74xXGz49Q3r; Wed, 22 May 2024 18:29:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1716391776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YdhVR3+NN04kq95OB6VoP1IhWp3th13UC/v6zov3Btg=; b=Y07KT1vVT2HiY27cccvSCpVgRr6elhiaROoEtJjyeoX79QFdOWG7NPl7Aap2G4uEZ8SILj sZOSttO468afJKlakP5LTs+OXWai0kXwK0cWcrE9919BBhJQ6COmmh1Je9qeMrPBC8Kt8r ny9j/kpFGiE1y6ltfvCLenep7SYSDnzLwHEdRYVNh8B3sf7JXebJphXNvhHKfHzhWgPQT+ Wdqd/bPKQo7stHTZkez9hlriT79cLT9qN4CjLUJOKLibMIWav2UVw63LtuKApBHzzDOA2h rntdXS5roRXUWdU22OHngp8wHfdwibD4yd545DnmWD9zUrpSXd0YxIHwhgV5PA== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1716391776; a=rsa-sha256; cv=none; b=b8xaJmwzHDnKu/GdtZ9apEADOfGbK3abZfSrQEY3IRAiPJjjYzwbOWIsojTtooECM200d+ lAdxWJtFZjs5idKgfOwzcYFMrsBmL4+MdXbQqjnw+1QOepJmVhMPx8HRqvLhOHhRnSQUPk Ro7GflrWIHrQnuZcpEZ2Uuyldix+2+3rcmeEzbkShVDNDYMl1PeTq1cJdNBDagsMhWWsG/ lBr7qu9mWddnRV1UFdRnEasDew0nAv2znJ+yQDgUs+ukqpJ+k2pl4gULoAC0yIl1OqN6F9 Awf5eFYyvTIf8kLgQl3o22Opw2ZptEepRZz8xiYJUyJ1SlljQPGc53ndvVc9Mg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1716391776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YdhVR3+NN04kq95OB6VoP1IhWp3th13UC/v6zov3Btg=; b=nun74w8j4LKtbBdTyYl+2bCfWZO45FL66vTYmrJoNKybBFPp3Td/ZnFIozCfm9p8nra+gD VVeZ1HNevbuc2cedjsLE72ViMmJ/diGmSD1np1oCulzkT2OicBLh63AP7LjkqJ0wdeGpxr Kz+SCTKTSHH39Z6Vl6kKf5vt2+p4nPg94GtwdgTa9IGz0IUgDcOJsUTzHn9Ce2hnCtoz3W nnjQPV4lEQkkWQN9A7nDmpEp4jbb2Z8rjLawD0JmHbUAKTwoTBzIquDgr14LFb51OJgZgC Qm/lu4vgdxCVle1fb+fR0RcuZ722c0sZ+9zRm81Kgra6ZueWGAFKzt7F5WUhdQ== Message-ID: Date: Wed, 22 May 2024 18:29:34 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: An implementation of multi-key sort To: Wang Yao , PostgreSQL Hackers Cc: "interma@outlook.com" References: Content-Language: en-US From: Heikki Linnakangas In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 22/05/2024 15:48, Wang Yao wrote: > Comparing to classic quick sort, it can get significant performance > improvement once multiple keys are available. A rough test shows it got > ~129% improvement than qsort for ORDER BY on 6 keys, and ~52% for CREATE > INDEX on the same data set. (See more details in section "Performance > Test") Impressive. Did you test the performance of the cases where MK-sort doesn't help, to check if there is a performance regression? -- Heikki Linnakangas Neon (https://neon.tech)