Re: Use bytearray for blobs or not?

2019-01-06 Thread Achilleas Mantzios
On 4/1/19 6:02 μ.μ., Rob Sargent wrote: On 1/4/19 4:48 AM, Achilleas Mantzios wrote: On 4/1/19 1:41 μ.μ., Thomas Güttler wrote: Some months ago I wrote a little application with Python+Django which stores blob data in bytearrays. It works. In the future there will be a lot more traffic, and

Optimizing the same PREPAREd static query (without parameters)

2019-01-06 Thread Mitar
Hi! 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? Mitar -- http://mitar.tnode.com/ https://twitter.com/mitar_m

Re: Watching for view changes

2019-01-06 Thread Mitar
Hi! I have a followup to this thread. George, thanks for all the help. I spend some time now investigating various approaches here and I am reporting here some findings, so that they might help others as well. First, I have tried the approach with MATERIALIZED VIEWs to hold the cached contents o

Re: Is there something wrong with my test case?

2019-01-06 Thread 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.508 > rows=0 loops=1) > C (cost=0.42..611.19 rows=31 wid

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

2019-01-06 Thread Andrew Gierth
> "Alexander" == Alexander Farber writes: Alexander> Good evening, thank you for the useful hints! 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 catch me around on IR

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

2019-01-06 Thread legrand legrand
Alexander Farber wrote > Good evening, thank you for the useful hints! > > With the further help of the IRC folks the query has been optimized (7-10 > seconds -> 0.3 second) by adding the following indices: > > CREATE INDEX ON words_games (player1, COALESCE(finished, 'INFINITY')); > CREATE INDEX

Re: About SSL connection

2019-01-06 Thread Adrian Klaver
On 1/6/19 6:10 AM, John Mikel wrote: Hi, i was trying to enable SSL on postgresql 10 and 11 Servers after searching on postregsql documentation i found this : ALTER SYSTEM SET/|configuration_parameter|/ { TO | = } {/|value|/ | '/|value|/' | DEFAULT } on https://www.postgresql.org/docs/10/sq

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

2019-01-06 Thread Alexander Farber
Good evening, thank you for the useful hints! With the further help of the IRC folks the query has been optimized (7-10 seconds -> 0.3 second) by adding the following indices: CREATE INDEX ON words_games (player1, COALESCE(finished, 'INFINITY')); CREATE INDEX ON words_games (player2, COALESCE(fin

Re: About SSL connection

2019-01-06 Thread Ron
On 1/6/19 8:10 AM, John Mikel wrote: Hi, i was trying to enable SSL on postgresql 10 and 11 Servers after searching on postregsql documentation i found this : ALTER SYSTEM SET/|configuration_parameter|/ { TO | = } {/|value|/ | '/|value|/' | DEFAULT } on https://www.postgresql.org/docs/10/sql-

Re: Is it impolite to dump a message

2019-01-06 Thread Ron
On 1/6/19 9:33 AM, Stephen Frost wrote: Greetings, * Thiemo Kellner (thi...@gelassene-pferde.biz) wrote: I posted a question and did not get a reaction. Now I wonder whether no one took interest (no offence meant) no one has an answer or whether the point in time I posted was just rubbish. In t

About SSL connection

2019-01-06 Thread John Mikel
Hi, i was trying to enable SSL on postgresql 10 and 11 Servers after searching on postregsql documentation i found this : ALTER SYSTEM SET *configuration_parameter* { TO | = } { *value* | '*value*' | DEFAULT } on https://www.postgresql.org/docs/10/sql-altersystem.html i used ALTER SYSTEM SET SSL

Re: Adding new collations after pg_upgrade?

2019-01-06 Thread rihad
On 01/06/2019 08:05 PM, rihad wrote: On 01/06/2019 07:57 PM, rihad wrote: On 01/06/2019 07:51 PM, Tom Lane wrote: rihad writes: Hi. on a freshly installed 10.6 I can see all ICU collations added in pg_collation schema. Is there a way to have them for an existing database cluster? There's a f

Re: Adding new collations after pg_upgrade?

2019-01-06 Thread rihad
On 01/06/2019 07:57 PM, rihad wrote: On 01/06/2019 07:51 PM, Tom Lane wrote: rihad writes: Hi. on a freshly installed 10.6 I can see all ICU collations added in pg_collation schema. Is there a way to have them for an existing database cluster? There's a function called something like pg_impor

Re: Adding new collations after pg_upgrade?

2019-01-06 Thread rihad
On 01/06/2019 07:51 PM, Tom Lane wrote: rihad writes: Hi. on a freshly installed 10.6 I can see all ICU collations added in pg_collation schema. Is there a way to have them for an existing database cluster? There's a function called something like pg_import_system_collations. See documentation

Re: Adding new collations after pg_upgrade?

2019-01-06 Thread Tom Lane
rihad writes: > Hi. on a freshly installed 10.6 I can see all ICU collations added in > pg_collation schema. Is there a way to have them for an existing > database cluster? There's a function called something like pg_import_system_collations. See documentation. regards,

Re: Is it impolite to dump a message

2019-01-06 Thread Stephen Frost
Greetings, * Thiemo Kellner (thi...@gelassene-pferde.biz) wrote: > I posted a question and did not get a reaction. Now I wonder whether no one > took interest (no offence meant) no one has an answer or whether the point > in time I posted was just rubbish. In the latter case I would be inclined to

Re: Is there something wrong with my test case?

2019-01-06 Thread 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) > B (cost=264.72..974.25 rows=31 width=58) (actual time=1.508..1.50

Is it impolite to dump a message

2019-01-06 Thread Thiemo Kellner
Hi all I posted a question and did not get a reaction. Now I wonder whether no one took interest (no offence meant) no one has an answer or whether the point in time I posted was just rubbish. In the latter case I would be inclined to dump/repost my question but only if this was not impol

Adding new collations after pg_upgrade?

2019-01-06 Thread rihad
Hi. on a freshly installed 10.6 I can see all ICU collations added in pg_collation schema. Is there a way to have them for an existing database cluster?