Re: Slow response to my query

Keith <[email protected]> Fri, 29 Nov 2019 10:01:16 -0500
Newsgroups gmane.comp.db.postgresql.novice
Message-ID <CAHw75vuDpf+XVPKotPTy7vDAqy2=NNDWdTsGR35JUORdKjOUQA@mail.gmail.com>
--0000000000009602c305987d8292
Content-Type: text/plain; charset="UTF-8"

On Fri, Nov 29, 2019 at 9:56 AM Bzzzz <[email protected]> wrote:

> On Fri, 29 Nov 2019 15:38:53 +0100
> Goke Aruna <[email protected]> wrote:
>
> > Thanks Jean-Yves / Steven,
> > am using V12.
>
> Depending on the way you mostly use your columns, you can also do the
> opposite: store date/timestamp into "pieces" in different columns
> (century, month, day, hours, minutes, seconds, milliseconds, time zone
> shift) and reconstitute a whole date/ts into an auto-generated column.
>
> Sometimes, you have to break the rules, especially with a large number of
> rows, because pre-calculation is way better than post in this case.
>
> Depending on your needs, you might also be interested into that:
> https://severalnines.com/database-blog/guide-partitioning-data-postgresql
>
> BTW, don't leave us dry, share your progress and results *<;-)
>
> Jean-Yves
>

Please do not advise the use of inheritance/trigger based partitioning
anymore, especially on PG12. Partitioning is now part of core and is much
more easily managed that way

https://www.postgresql.org/docs/12/ddl-partitioning.html

--0000000000009602c305987d8292
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 29, 2019 at 9:56 AM Bzzzz=
 &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<=
br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e=
x;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 29 Nov 2=
019 15:38:53 +0100<br>
Goke Aruna &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">goksie=
@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Thanks Jean-Yves / Steven,<br>
&gt; am using V12.<br>
<br>
Depending on the way you mostly use your columns, you can also do the<br>
opposite: store date/timestamp into &quot;pieces&quot; in different columns=
<br>
(century, month, day, hours, minutes, seconds, milliseconds, time zone<br>
shift) and reconstitute a whole date/ts into an auto-generated column.<br>
<br>
Sometimes, you have to break the rules, especially with a large number of<b=
r>
rows, because pre-calculation is way better than post in this case.<br>
<br>
Depending on your needs, you might also be interested into that:<br>
<a href=3D"https://severalnines.com/database-blog/guide-partitioning-data-p=
ostgresql" rel=3D"noreferrer" target=3D"_blank">https://severalnines.com/da=
tabase-blog/guide-partitioning-data-postgresql</a><br>
<br>
BTW, don&#39;t leave us dry, share your progress and results *&lt;;-)<br>
<br>
Jean-Yves<br>
</blockquote><div><br></div><div>Please do not advise the use of inheritanc=
e/trigger based partitioning anymore, especially on PG12. Partitioning is n=
ow part of core and is much more easily managed that way</div><div><br></di=
v><div><a href=3D"https://www.postgresql.org/docs/12/ddl-partitioning.html"=
>https://www.postgresql.org/docs/12/ddl-partitioning.html</a></div><div><br=
></div><div> <br></div></div></div>

--0000000000009602c305987d8292--