[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [GENERAL] partitioning question
From: Alex Samad <alex () samad ! com ! au>
Date: 2017-07-31 22:58:08
Message-ID: CAJ+Q1PV1X=6w4o8LYst3joPnzwtP_qF_DN-Y5i4OyxsbB0d4nw () mail ! gmail ! com
[Download RAW message or body]
The comparison would be
a if then else end if .. about 8 of them 2013-> and a static insert into
v's
making a dynamic string and using execute, my presumption would be the
execute would be expensive verses a INSERT command
A
On 1 August 2017 at 07:04, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Sun, Jul 30, 2017 at 7:13 PM, Alex Samad <alex@samad.com.au> wrote:
> > How expensive is dynamic over static. I'm looking at storing yearly
> now, so
> > I figure if my if then clause has the latest year at the top it should be
> > very quick.
>
> Assuming you're not doing anything particularly crazy it's minimal.
> But what is good performance for one application may not be acceptable
> for others. Generally the cost of inserting is MUCH higher than the
> cost of dynamically setting the target, esp if you stick to plpgsql
> and don't try to use rules to accomplish it.
>
[Attachment #3 (text/html)]
<div dir="ltr">The comparison would be<div><br></div><div>a if then else end if .. \
about 8 of them 2013-> and a static insert into \
</div><div><br></div><div>v's</div><div><br></div><div>making a dynamic string \
and using execute, my presumption would be the execute would be expensive verses a \
INSERT command</div><div><br></div><div>A</div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On 1 August 2017 at 07:04, Scott \
Marlowe <span dir="ltr"><<a href="mailto:scott.marlowe@gmail.com" \
target="_blank">scott.marlowe@gmail.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On Sun, Jul 30, 2017 at 7:13 PM, Alex Samad \
<<a href="mailto:alex@samad.com.au">alex@samad.com.au</a>> wrote:<br> > How \
expensive is dynamic over static. I'm looking at storing yearly now, so<br> \
> I figure if my if then clause has the latest year at the top it should be<br> \
> very quick.<br> <br>
</span>Assuming you're not doing anything particularly crazy it's \
minimal.<br> But what is good performance for one application may not be \
acceptable<br> for others. Generally the cost of inserting is MUCH higher than \
the<br> cost of dynamically setting the target, esp if you stick to plpgsql<br>
and don't try to use rules to accomplish it.<br>
</blockquote></div><br></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic