Re: [GENERAL] Slow query when the select list is big

2016-05-08 Thread David G. Johnston
On Sunday, May 8, 2016, Sterpu Victor wrote: > Yes but it is very big. > I don't understand why the select list is influencing the CPU usage. > I was expecting that only the join and where clauses would influence CPU. > > PostgreSQL is smart enough to optimize away stuff that it knows doesn't imp

Re: [GENERAL] Slow query when the select list is big

2016-05-08 Thread John R Pierce
On 5/8/2016 11:09 PM, Sterpu Victor wrote: Yes but it is very big. I don't understand why the select list is influencing the CPU usage. I was expecting that only the join and where clauses would influence CPU. what was the query that generated that really complicated execution plan? it sure l

Re: [GENERAL] Thoughts on "Love Your Database"

2016-05-08 Thread Achilleas Mantzios
On 04/05/2016 15:55, Szymon Lipiński wrote: at my previous jobs I was working with many programmers, and almost none of them understood SQL. The problem was even deeper. They didn't want to learn it. When I was working among java programmers, I noticed that they hated SQL, but there was no prob

Re: [GENERAL] Slow query when the select list is big

2016-05-08 Thread Rob Imig
Can you share the full query and output of EXPLAIN ? Not much data here yet. On Mon, May 9, 2016 at 6:58 AM Sterpu Victor wrote: > I have a big query that takes about 7 seconds to run(time sending the data > to the client is not counted). > Postgres uses 100% of 1 CPU when solving this query. I t

[GENERAL] Slow query when the select list is big

2016-05-08 Thread Sterpu Victor
I have a big query that takes about 7 seconds to run(time sending the data to the client is not counted). Postgres uses 100% of 1 CPU when solving this query. I tried to run the query on a HDD and on a SSD with no difference. HDD show about 10% usage while the query runs. The query has a big "

Re: [GENERAL] Allow disabling folding of unquoted identifiers to lowercase

2016-05-08 Thread Raymond O'Donnell
On 08/05/2016 10:41, Klaus P. Pieper wrote: > For me is the way Sybase works is just more convenient: > > CREATE MyTable (MyColumn varchar); > > creates a camel cased table MyType and field MyColumn. > > SELECT * FROM SYSCATALOG gives MyTable. > > This is better readable when you use long t

Re: [GENERAL] Allow disabling folding of unquoted identifiers to lowercase

2016-05-08 Thread Klaus P. Pieper
> -Ursprüngliche Nachricht- > > What exactly is the problem you are trying to solve? > > If you and your users are consistent about never using quotes, your users can > write: > > SELECT MyColumn FROM MyTable ORDER BY MyColumn; > > It will select mycolumn from mytable, but that doesn't

Re: [GENERAL] Allow disabling folding of unquoted identifiers to lowercase

2016-05-08 Thread Peter J. Holzer
On 2016-04-29 19:21:30 +0200, Evgeny Morozov wrote: > It would be great if Postgres had a server setting that allowed the automatic > folding of identifiers to lowercase to be disabled, so that camel case > identifiers could be used without having to quote every single identifier, > i.e. > > SELE