pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: James Coleman <jtc331@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: sqlsmith crash incremental sort
Date: Thu, 16 Apr 2020 21:26:40 -0400
Message-ID: <20403.1587086800@sss.pgh.pa.us> (raw)
In-Reply-To: <20200417005420.ye342t2nljg4nuhk@development>
References: <20200411191952.GA30754@telsasoft.com>
	<20200411202639.2o7quia37zd6ypw7@development>
	<20200411214639.GK2228@telsasoft.com>
	<20200411224445.x4whiaeo67glpqen@development>
	<20200413000943.bejni6axj7v4q5rn@development>
	<CAAaqYe8Qt9ASuiphdjQxnMs6J6M2KSg4c=pRi5d=nQMxiSsjKw@mail.gmail.com>
	<20200415144712.wyvpgvsujzzcf2qg@development>
	<CAAaqYe_zyDMYwWWag0nhh_dQwPavsL=xyd7en2W0=1an1E1uPQ@mail.gmail.com>
	<20200417005420.ye342t2nljg4nuhk@development>

Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> I think we have essentially three options:
> 1) assuming there's just a single group
> 2) assuming each row is a separate group
> 3) something in between
> If (1) and (2) are worst/best-case scenarios, maybe we should pick
> something in between. We have DEFAULT_NUM_DISTINCT (200) which
> essentially says "we don't know what the number of groups is" so maybe
> we should use that.

I wouldn't recommend picking either the best or worst cases.

Possibly DEFAULT_NUM_DISTINCT is a sane choice, though it's fair to
wonder if it's quite applicable to the case where we already know
we've grouped by some columns.

			regards, tom lane





view thread (25+ messages)  latest in thread

Message-ID: <20403.1587086800@sss.pgh.pa.us>
Permalink:  ../20403.1587086800@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20403.1587086800@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tomas.vondra@2ndquadrant.com, jtc331@gmail.com, pryzby@telsasoft.com
  Subject: Re: sqlsmith crash incremental sort
  In-Reply-To: <20403.1587086800@sss.pgh.pa.us>
  References: <20200411191952.GA30754@telsasoft.com> <20200411202639.2o7quia37zd6ypw7@development> <20200411214639.GK2228@telsasoft.com> <20200411224445.x4whiaeo67glpqen@development> <20200413000943.bejni6axj7v4q5rn@development> <CAAaqYe8Qt9ASuiphdjQxnMs6J6M2KSg4c=pRi5d=nQMxiSsjKw@mail.gmail.com> <20200415144712.wyvpgvsujzzcf2qg@development> <CAAaqYe_zyDMYwWWag0nhh_dQwPavsL=xyd7en2W0=1an1E1uPQ@mail.gmail.com> <20200417005420.ye342t2nljg4nuhk@development> <20403.1587086800@sss.pgh.pa.us>

* 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