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 1q0zal-0007JF-7r for pgsql-admin@arkaria.postgresql.org; Mon, 22 May 2023 07:04:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q0zak-0006qj-00 for pgsql-admin@arkaria.postgresql.org; Mon, 22 May 2023 07:04:26 +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 1q0zaj-0006qZ-LA for pgsql-admin@lists.postgresql.org; Mon, 22 May 2023 07:04:25 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q0zae-001JJM-R2 for pgsql-admin@lists.postgresql.org; Mon, 22 May 2023 07:04:25 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-5648e904593so35038357b3.3 for ; Mon, 22 May 2023 00:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684739060; x=1687331060; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=o6h7ABtNiYzSBe44BXYGhhJvi1xpDqdKHv0NFjhfn6Q=; b=btoWRZWCd3/vEehgi27TMqE/qEmSyLdpk5IyqtmadbokeqTYMKsz+vs84FTEO0YTNj tIsdUtWV/62NwRynZas69QYYwtsTW7ZV/sekzSZ4/XWt+HNAl8iWk7JNUWJxLMq8hh2I JUGlZ4hD6nzjB5h1KCXu07FGTJfFcUBm607zFy3UEbduibTe8IC8DbOWhZL4Jf/SFPLM Lmnn0g2ulWJfrVOOkZWs6n2+cIEMf7rh1q5NhM9At3Bech4up1I2bfF6UYxeDhYSy4LC uCc/kbYapNlnTMbHDKfMCpHlWR0iBg7iBs6PJ7cOAZhTBa2VKAP/zRtisxO8bj4KxdjB klfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684739060; x=1687331060; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=o6h7ABtNiYzSBe44BXYGhhJvi1xpDqdKHv0NFjhfn6Q=; b=KSp5SrgHVSAfG4cYf8+cKJHMsOmw3VZk25hqdH9mooWA6FYsEiOHOeDDb1sP5LT26m Tud+A20elZuMXvsNXaXT6TyE+37ZQAXhxieZHgJ5qirjpFzh1G/YdNRBXXZy0EJ4iaDE 7cWplxoq80bMFgRJN5eekeATpwTgYSfY2Aelctkiymi8X4oz9Evo0OdBWdXSKG3roygx cro3GyH6Dy1WtmM3XgXAzYTanZPWD5HptKx2R5PDRf/V0Ko2SD8bu4FYhbHqwWLweDQ6 ScTrbiQ97rf2XTTYt6IRWwwKC00eKZmjx5lNiGQTdbXlqJdwgYM1vOHp53I+IdXgRNIZ cF4Q== X-Gm-Message-State: AC+VfDz1WXwFqreud6/on0MDyhdCsXK6xoGPan5tq3ZnRmHQtFmnvmZN ZmEAbd1Dt1cisAN2qlNLIrHOiiTUFqY= X-Google-Smtp-Source: ACHHUZ5HCAEqtmlx97Fn9uTg8ILvH4UOU9HyqWfk4razsU5mfmqowSJR7zKEORLXZuViZuz7htF8lw== X-Received: by 2002:a81:4995:0:b0:561:be3f:ae2e with SMTP id w143-20020a814995000000b00561be3fae2emr9729830ywa.44.1684739059663; Mon, 22 May 2023 00:04:19 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:6922:b189:696b:eba2? ([2600:1700:bd2c:b810:6922:b189:696b:eba2]) by smtp.googlemail.com with ESMTPSA id n10-20020a0dcb0a000000b005569567aac1sm1850194ywd.106.2023.05.22.00.04.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 May 2023 00:04:19 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------YwHmJiJ8jAFntS3TdryXsosW" Message-ID: Date: Mon, 22 May 2023 02:04:19 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Partition By Range Without PrimaryKey : Postgresql Version 12.8 on AWS RDS Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------YwHmJiJ8jAFntS3TdryXsosW Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/22/23 01:53, Phani Prathyush Somayajula wrote: > > Hi All, > > I’ve a table ermabet having 80mil records. My business need is to check > the bet placed by a player(users), which queries the table, and enable > streaming for the player only if he has placed his bet in the last 24 hrs( > granular to the millisecond). > [snip] > > But I don’t want */PLACEDON/* column part of the primary key. > And I didn't want partition_date in my PK, either, but I had to add so as to partition on the part_date column. -- Born in Arizona, moved to Babylonia. --------------YwHmJiJ8jAFntS3TdryXsosW Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 5/22/23 01:53, Phani Prathyush Somayajula wrote:

Hi All,

 

I’ve a table ermabet having 80mil records. My business need is to check the bet placed by a player(users), which queries the table, and enable streaming for the player only if he has placed his bet in the last 24 hrs( granular to the millisecond).

[snip]
 

 

But I don’t want PLACEDON column part of the primary key.


And I didn't want partition_date in my PK, either, but I had to add so as to partition on the part_date column.

--
Born in Arizona, moved to Babylonia.
--------------YwHmJiJ8jAFntS3TdryXsosW--