From: | Alvaro Hernandez <aht(at)ongres(dot)com> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgbench - allow to specify scale as a size |
Date: | 2018-02-17 17:40:03 |
Message-ID: | b817da51-741e-b98c-38a8-6366c5e6e9d8@ongres.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 17/02/18 12:37, Fabien COELHO wrote:
>
>> Why not then insert a "few" rows, measure size, truncate the
>> table, compute the formula and then insert to the desired user
>> requested size? (or insert what should be the minimum, scale 1,
>> measure, and extrapolate what's missing). It doesn't sound too
>> complicated to me, and targeting a size is
>> something that I believe it's quite good for user.
>
> The formula I used approximates the whole database, not just one
> table. There was one for the table, but this is only part of the
> issue. In particular, ISTM that index sizes should be included when
> caching is considered.
>
> Also, index sizes are probably in n ln(n), so some level of
> approximation is inevitable.
>
> Moreover, the intrinsic granularity of TPC-B as multiple of 100,000
> rows makes it not very precise wrt size anyway.
>
Sure, makes sense, so my second suggestion seems more reasonable:
insert with scale 1, measure there (ok, you might need to crete indexes
only to later drop them), and if computed scale > 1 then insert whatever
is left to insert. Shouldn't be a big deal to me.
I like the feature :)
Álvaro
--
Alvaro Hernandez
-----------
OnGres
From | Date | Subject | |
---|---|---|---|
Next Message | Marina Polyakova | 2018-02-17 18:42:33 | Re: master check fails on Windows Server 2008 |
Previous Message | Fabien COELHO | 2018-02-17 17:37:38 | Re: pgbench - allow to specify scale as a size |