[GENERAL] LIMIT clause slowing down query in some cases, accelerating in others

2017-04-26 Thread Klaus P. Pieper
Running PostgreSQL 9.6 on a Windows Server. Table "t" is kind of a materialized view with > 100 columns and 2.24 Mio rows. Queries are generated by an ORM framework - fairly difficult to modify. Vacuum analyze was carried out - no impact. The framework generates queries like this:

Re: [GENERAL] TimeScaleDB -- Open Source Time Series Database Released (www.i-programmer.info);

2017-04-26 Thread Joshua D. Drake
On 04/10/2017 05:22 AM, Steve Petrie, P.Eng. wrote: Please see below. TimeseriesDB is an interesting project. They actually sponsored at spoke at PGConf US. You can see their presentation here: https://www.pgconf.us/conferences/2017/program/proposals/372 Thanks, JD -- Command Prompt,

Re: [GENERAL] The Contractor Conundrum

2017-04-26 Thread Andrew Kerber
All I can say is welcome to the world of contracting. You have successfully described the nature of the business. On Wed, Apr 26, 2017 at 10:33 AM, Geoff Winkless wrote: > On 26 April 2017 at 15:45, Melvin Davidson wrote: > >> In summary, I can only

Re: [GENERAL] The Contractor Conundrum

2017-04-26 Thread Geoff Winkless
On 26 April 2017 at 15:45, Melvin Davidson wrote: > In summary, I can only advise that aspiring contractors find out as much > about a system/schema/policies before commiting to a contract, no matter > how much they offer to pay. An interesting perspective, thanks. >From

[GENERAL] The Contractor Conundrum

2017-04-26 Thread Melvin Davidson
This article is written as my experience as a PostgreSQL contractor and to all those that that think they might want to be one. It all began about 4 years ago when, oddly enough, I retired. Shortly after I moved to my new, and final home ( I hope), I began recieving calls from headhunters wanting

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Adrian Klaver
On 04/26/2017 06:56 AM, Ron Ben wrote: Hi, What are standbys? Standbys are the standby servers when you are using replication: https://www.postgresql.org/docs/9.3/static/high-availability.html I am guessing you are not using replication. My question was more of how to actualy do the

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread David G. Johnston
​The convention on these lists is to bottom-post. On Wed, Apr 26, 2017 at 6:56 AM, Ron Ben wrote: > Hi, > > What are standbys? > High-level: ​a standby is a second server, running the same version of PostgreSQL, the reads the real-time backup/WAL data from the primary

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Ron Ben

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Adrian Klaver
On 04/26/2017 03:36 AM, Ron Ben wrote: Hi :) I do have a test enviroment and I will test eveything there first but I had cases where eveything worked on test but on production I had difficultes. It's rare but can happen. Problems with upgrading PostgreSQL isn't like upgrading a package which

Re: [GENERAL] Questions regarding JSON processing

2017-04-26 Thread Pavel Stehule
2017-04-26 15:06 GMT+02:00 Glen Huang : > @Pavel > > Thanks for bringing PLV8 to my attention. Wasn't aware of it. Sounds like > the right tool to for the job. I'll try it out. Do you think it makes sense > to use PLV8 to also generate JSON? Can it beat SQL? > Hard to say -

Re: [GENERAL] Questions regarding JSON processing

2017-04-26 Thread Glen Huang
@Pavel Thanks for bringing PLV8 to my attention. Wasn't aware of it. Sounds like the right tool to for the job. I'll try it out. Do you think it makes sense to use PLV8 to also generate JSON? Can it beat SQL? Good to know functions are executed under transaction, I think that should be enough

Re: [GENERAL] GENERAL - [How to check if the array contains the element.]

2017-04-26 Thread Pavel Stehule
Hi 2017-04-26 13:33 GMT+02:00 Andreas Kretschmer : > > > Am 26.04.2017 um 13:24 schrieb VENKTESH GUTTEDAR: > >> Hello All, >> >> How do i check if any one element of one array exists in another >> array. >> Eg: >> array1 = [1,2,3,4] >> array2 =

Re: [GENERAL] GENERAL - [How to check if the array contains the element.]

2017-04-26 Thread Andreas Kretschmer
Am 26.04.2017 um 13:24 schrieb VENKTESH GUTTEDAR: Hello All, How do i check if any one element of one array exists in another array. Eg: array1 = [1,2,3,4] array2 = [1,4,5,7] Now i expect the result as true even if any one element matches from array2 in array1.

[GENERAL] GENERAL - [How to check if the array contains the element.]

2017-04-26 Thread VENKTESH GUTTEDAR
Hello All, How do i check if any one element of one array exists in another array. Eg: array1 = [1,2,3,4] array2 = [1,4,5,7] Now i expect the result as true even if any one element matches from array2 in array1. Any help would be appreciated. Thank you. --

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Ron Ben
Hi :) I do have a test enviroment and I will test eveything there first but I had cases where eveything worked on test but on production I had difficultes. It's rare but can happen. Problems with upgrading PostgreSQL isn't like upgrading a package which effects few functions. Since the

Re: [GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Sameer Kumar
On Wed, Apr 26, 2017 at 4:41 PM Ron Ben wrote: > I'm runing PostgreSQL 9.3.3 and I want to upgrade it to the latest 9.3 > version > The documontation does not specify what needs to be done other than "just > install the executables". > This is wierd as for example 9.3.5

Re: [GENERAL] [OT] Help: stories of database security and privacy

2017-04-26 Thread vinny
On 2017-04-26 11:47, Lifepillar wrote: On 12/04/2017 10:57, vinny wrote: On 2017-04-12 09:09, Lifepillar wrote: So, I am here to ask if you have interesting/(in)famous stories to share on database security/privacy "gone wrong" or "done right"(tm), possibly with technical details One case

Re: [GENERAL] [OT] Help: stories of database security and privacy

2017-04-26 Thread Lifepillar
On 12/04/2017 10:57, vinny wrote: On 2017-04-12 09:09, Lifepillar wrote: So, I am here to ask if you have interesting/(in)famous stories to share on database security/privacy "gone wrong" or "done right"(tm), possibly with technical details One case that I remember from an ancient version of

Re: [GENERAL] tuple statistics update

2017-04-26 Thread Tom DalPozzo
Hi, 2017-04-19 16:37 GMT+02:00 Tom Lane : > Tom DalPozzo writes: > > 2017-04-18 22:06 GMT+02:00 Tom Lane : > >> If your session is just sitting, that's not surprising. I think stats > >> updates are only transmitted to the collector

Re: [GENERAL] tuple statistics update

2017-04-26 Thread Tom DalPozzo
Hi, 2017-04-19 15:49 GMT+02:00 Adrian Klaver : > On 04/19/2017 12:28 AM, Tom DalPozzo wrote: > >> 2017-04-18 21:42 GMT+02:00 Adrian Klaver > >: >> >> On 04/17/2017 09:18 AM, Tom DalPozzo wrote: >> >>

[GENERAL] How to upgrade PostgreSQL minor version?

2017-04-26 Thread Ron Ben
I'm runing PostgreSQL 9.3.3 and I want to upgrade it to the latest 9.3 version The documontation does not specify what needs to be done other than "just install the executables". This is wierd as for example 9.3.5 release notes request to run a specifc query to  check for pg_multixact files left.