[prev in list] [next in list] [prev in thread] [next in thread]
List: pgsql-performance
Subject: Re: Zero throughput on a query on a very large table.
From: "ldh () laurent-hasson ! com" <ldh () laurent-hasson ! com>
Date: 2019-01-25 20:31:21
Message-ID: BN6PR15MB118531B02818010CF1A26992859B0 () BN6PR15MB1185 ! namprd15 ! prod ! outlook ! com
[Download RAW message or body]
Correct, but in the Java code, it's multiple statements in a single transaction, so \
it should stick. Not sure if something else stupid is going on.
Good to know about the ALTER DATABASE effect. I didn't realize that.
Thanks a billion.
Laurent.
________________________________
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Friday, January 25, 2019 3:04:37 PM
To: ldh@laurent-hasson.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Zero throughput on a query on a very large table.
"ldh@laurent-hasson.com" <ldh@laurent-hasson.com> writes:
> Second, here is what i found and what messed us up.
> select current_setting('random_page_cost'); --> 4
> alter database "CMS_TMP" set random_page_cost=0.00000001;
> select current_setting('random_page_cost'); --> 4 ????
ALTER DATABASE only affects subsequently-started sessions.
> I also tried:
> select current_setting('random_page_cost'); --> 4
> select set_config('random_page_cost', '0.000001', true);
> select current_setting('random_page_cost'); --> 4 ????
That "true" means "local to the current transaction", which is
just the one statement if you don't have a BEGIN.
regards, tom lane
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} \
--></style> </head>
<body dir="ltr">
<div id="divtagdefaultwrapper" \
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" \
dir="ltr"> <p style="margin-top:0;margin-bottom:0">Correct, but in the Java code, \
it's multiple statements in a single transaction, so it should stick. Not sure if \
something else stupid is going on.</p> <p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Good to know about the ALTER DATABASE effect. \
I didn't realize that.</p> <p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks a billion.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Laurent.<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" \
style="font-size:11pt" color="#000000"><b>From:</b> Tom Lane \
<tgl@sss.pgh.pa.us><br> <b>Sent:</b> Friday, January 25, 2019 3:04:37 PM<br>
<b>To:</b> ldh@laurent-hasson.com<br>
<b>Cc:</b> pgsql-performance@postgresql.org<br>
<b>Subject:</b> Re: Zero throughput on a query on a very large table.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">"ldh@laurent-hasson.com" \
<ldh@laurent-hasson.com> writes:<br> > Second, here is what i found and what \
messed us up.<br> <br>
> select current_setting('random_page_cost'); --> 4<br>
> alter database "CMS_TMP" set \
random_page_cost=0.00000001;<br> > select \
current_setting('random_page_cost'); --> 4 ????<br> <br>
ALTER DATABASE only affects subsequently-started sessions.<br>
<br>
> I also tried:<br>
> select current_setting('random_page_cost'); --> 4<br>
> select set_config('random_page_cost', '0.000001', \
true);<br> > select current_setting('random_page_cost'); \
--> 4 ????<br> <br>
That "true" means "local to the current transaction", which \
is<br> just the one statement if you don't have a BEGIN.<br>
<br>
\
regards, tom lane<br> </div>
</span></font></div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic