Re: Memory exhaustion due to temporary tables?

2019-01-07 Thread Thomas Carroll
> In the meantime, you might think about switching over to some process > that doesn't create and drop the same table constantly.  Perhaps > along the lines of > create temp table if not exists tt_preTally (...) on commit delete rows; > if (tt_preTally contains no rows) then >  insert into tt_pr

Re: Not sure which part of the query needs optimization

2019-01-07 Thread Andrew Gierth
> "Alexander" == Alexander Farber writes: Alexander> Good afternoon, Alexander> for each visitor of my website I generate a JSON list of 30 Alexander> top players ( https://slova.de/words/top.php ), who played Alexander> in the past week, with their average scores and average time Alexa

Re: Optimizing the same PREPAREd static query (without parameters)

2019-01-07 Thread Mitar
Hi! On Mon, Jan 7, 2019 at 12:44 AM David Rowley wrote: > If you're asking if it caches the result and foregoes scanning the > underlying tables, then that's a "No". Else what further optimising > did you have in mind? For example, it could learn better statistics. In documentation [1] it is wr

Re: About SSL connection

2019-01-07 Thread Adrian Klaver
On 1/7/19 2:51 AM, John Mikel wrote: Please reply to list also Ccing list Thanks, after setting the postgresql.conf file nothing changes (ssl = off) is this a bug or what ? Did you restart the server? Per Ron's post what are the error messages in the Postgres and/or system logs? how to

Re: Adding LEFT JOIN to a query has increased execution time 10 times

2019-01-07 Thread Alexander Farber
Hi Andrew - On Mon, Jan 7, 2019 at 12:00 AM Andrew Gierth wrote: > > "Alexander" == Alexander Farber writes: > Alexander> With the further help of the IRC folks the query has been > Alexander> optimized (7-10 seconds -> 0.3 second) > > 0.3 MILLIseconds, actually. > > (You chanced not to c

Not sure which part of the query needs optimization

2019-01-07 Thread Alexander Farber
Good afternoon, for each visitor of my website I generate a JSON list of 30 top players ( https://slova.de/words/top.php ), who played in the past week, with their average scores and average time between moves. With 5 seconds this query is taking quite a bit of time: https://explain.depesz.com/s/

Re: Which queries have run query trace form .exe.

2019-01-07 Thread Ron
On 1/7/19 6:52 AM, Vimal Kanzariya wrote: *Hello,* I need find out some database operation which is executed form One of the .exe. I have installed that .exe into my system and once i executed that .exe it is executed some operation into PostgreSQL 9.5 (version 1.22.1). So i want to know what

Which queries have run query trace form .exe.

2019-01-07 Thread Vimal Kanzariya
*Hello,* I need find out some database operation which is executed form One of the .exe. I have installed that .exe into my system and once i executed that .exe it is executed some operation into PostgreSQL 9.5 (version 1.22.1). So i want to know what operation done by that .exe into which table.

Re: Is there something wrong with my test case?

2019-01-07 Thread Thiemo Kellner
Hi Fabio Quoting Fabio Pardi : The cost is not a range. The 2 numbers you see are: * Estimated start-up cost. This is the time expended before the output phase can begin, e.g., time to do the sorting in a sort node. *Estimated total cost. This is stated on the assumption that

Re: Is there something wrong with my test case?

2019-01-07 Thread Fabio Pardi
Hi Thiemo, On 07/01/2019 11:30, Thiemo Kellner wrote: > > Hi HP > > Thanks for your reply. > > Quoting "Peter J. Holzer" : > >> On 2018-12-25 11:54:11 +, Thiemo Kellner wrote: >> [three different but functionally equivalent queries] >> >>> Explain analyze verbose showed for: >>> A (cost=264.7

Re: Is there something wrong with my test case?

2019-01-07 Thread Thiemo Kellner
Hi David Thanks for your revision. Quoting David Rowley : On Wed, 26 Dec 2018 at 00:54, Thiemo Kellner wrote: Explain analyze verbose showed for: A (cost=264.72..626.97 rows=31 width=90) (actual time=1.117..1.117 rows=0 loops=1) B (cost=264.72..974.25 rows=31 width=58) (actual time=1.508..1.

Re: Is there something wrong with my test case?

2019-01-07 Thread Thiemo Kellner
Hi HP Thanks for your reply. Quoting "Peter J. Holzer" : On 2018-12-25 11:54:11 +, Thiemo Kellner wrote: [three different but functionally equivalent queries] Explain analyze verbose showed for: A (cost=264.72..626.97 rows=31 width=90) (actual time=1.117..1.117 rows=0 loops=1) C (cost=

Re: Use bytearray for blobs or not?

2019-01-07 Thread Thomas Güttler
I came across this article, and now I think blob in s3 in s3-object-id in PostgreSQL are the best solution for me: https://wiki.postgresql.org/wiki/BinaryFilesInDB I hope the wiki page is still valid. Regards, Thomas Am 04.01.19 um 12:41 schrieb Thomas Güttler: Some months ago I wrote a l

Re: Optimizing the same PREPAREd static query (without parameters)

2019-01-07 Thread David Rowley
On Mon, 7 Jan 2019 at 21:40, Mitar wrote: > > On Mon, Jan 7, 2019 at 12:09 AM David Rowley > wrote: > > On Mon, 7 Jan 2019 at 18:54, Mitar wrote: > > > If I have a PREPAREd query without parameters (static) and I EXECUTE > > > it repeatedly in the same session, does PostgreSQL learn/optimize > >

Re: Optimizing the same PREPAREd static query (without parameters)

2019-01-07 Thread Mitar
Hi! On Mon, Jan 7, 2019 at 12:09 AM David Rowley wrote: > On Mon, 7 Jan 2019 at 18:54, Mitar wrote: > > If I have a PREPAREd query without parameters (static) and I EXECUTE > > it repeatedly in the same session, does PostgreSQL learn/optimize > > anything across those runs? > > Yes, it will gene

Re: Optimizing the same PREPAREd static query (without parameters)

2019-01-07 Thread David Rowley
On Mon, 7 Jan 2019 at 18:54, Mitar wrote: > If I have a PREPAREd query without parameters (static) and I EXECUTE > it repeatedly in the same session, does PostgreSQL learn/optimize > anything across those runs? Yes, it will generate the query plan on the first invocation of EXECUTE and use that p