pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: 2 million queries against a table
Date: Wed, 15 Jul 2020 09:55:59 -0600
Message-ID: <a13db24b-dd45-b1e5-c2de-2bc8edb810ae@gmail.com> (raw)
In-Reply-To: <3077129.1594827537@sss.pgh.pa.us>
References: <CAEP=qeOSNniLWhCKkyU774xFH9feQ=SKsuB-zoXthxdMj5GtKw@mail.gmail.com>
<3077129.1594827537@sss.pgh.pa.us>
On 7/15/20 9:38 AM, Tom Lane wrote:
> Adam Sanchez <a.sanchez75@gmail.com> writes:
>> I need to run 2 million queries against a three columns table t
>> (s,p,o) which size is 10 billions rows. The data type of each column
>> is string. The server has 512G RAM, 32 cores and 14T SSD (RAID 0)
>
>> Only two types of queries:
>
>> select s p o from t where s = param
>> select s p o from t where o = param
>
> TBH, this is a pretty silly way to use a SQL database. Put
> the probe values into a temporary table (in batches, perhaps)
> and do a join. The per-row cost of that sort of approach
> will be multiple orders of magnitude smaller than a query
> per row.
>
> regards, tom lane
>
>
I had assumed the OP was planning a performance test for say 2M separate
user/requests (perhaps non-unique) rather than asking for the specific
2M records.
view thread (4+ messages)
Message-ID: <a13db24b-dd45-b1e5-c2de-2bc8edb810ae@gmail.com> Permalink: ../a13db24b-dd45-b1e5-c2de-2bc8edb810ae@gmail.com/ Also on: postgresql.org/message-id/a13db24b-dd45-b1e5-c2de-2bc8edb810ae@gmail.com ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-general@postgresql.org Cc: robjsargent@gmail.com Subject: Re: 2 million queries against a table In-Reply-To: <a13db24b-dd45-b1e5-c2de-2bc8edb810ae@gmail.com> References: <CAEP=qeOSNniLWhCKkyU774xFH9feQ=SKsuB-zoXthxdMj5GtKw@mail.gmail.com> <3077129.1594827537@sss.pgh.pa.us> <a13db24b-dd45-b1e5-c2de-2bc8edb810ae@gmail.com> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox