pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: James Coleman <jtc331@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: sqlsmith crash incremental sort
Date: Mon, 20 Apr 2020 01:47:29 +0200
Message-ID: <20200419234729.tglhf2iqlpkkpk3m@development> (raw)
In-Reply-To: <CAAaqYe-SZUZRCYKZBUvrWDv=TTS6p4Xb8wO6cLXDsJhJ2D6K1Q@mail.gmail.com>
References: <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>
	<CAAaqYe-SZUZRCYKZBUvrWDv=TTS6p4Xb8wO6cLXDsJhJ2D6K1Q@mail.gmail.com>

On Sat, Apr 18, 2020 at 02:23:25PM -0400, James Coleman wrote:
>On Thu, Apr 16, 2020 at 9:26 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> 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.
>
>Do you think defining a new default, say,
>DEFAULT_NUM_DISTINCT_PRESORTED is preferred then? And choose some
>value like "1/2 of the normal DEFAULT_NUM_DISTINCT groups" or some
>such?
>

If we had a better intuition what a better value is, maybe. But I don't
think we have that at all, so I'd just use the existing one.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (25+ messages)  latest in thread

Message-ID: <20200419234729.tglhf2iqlpkkpk3m@development>
Permalink:  ../20200419234729.tglhf2iqlpkkpk3m@development/
Also on:    postgresql.org/message-id/20200419234729.tglhf2iqlpkkpk3m@development

 · 

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: tomas.vondra@2ndquadrant.com, jtc331@gmail.com, tgl@sss.pgh.pa.us, pryzby@telsasoft.com
  Subject: Re: sqlsmith crash incremental sort
  In-Reply-To: <20200419234729.tglhf2iqlpkkpk3m@development>
  References: <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> <CAAaqYe-SZUZRCYKZBUvrWDv=TTS6p4Xb8wO6cLXDsJhJ2D6K1Q@mail.gmail.com> <20200419234729.tglhf2iqlpkkpk3m@development>

* 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