Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Claudio Freire
On Sat, Dec 13, 2014 at 12:05 AM, Andrew Dunstan wrote: > On 12/12/2014 08:20 PM, Tom Lane wrote: >> >> We can't just add the operator and worry about usability later; >> if we're thinking we might want to introduce such an automatic >> transformation, we have to be sure the new operator is define

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Andrew Dunstan
On 12/12/2014 08:20 PM, Tom Lane wrote: We can't just add the operator and worry about usability later; if we're thinking we might want to introduce such an automatic transformation, we have to be sure the new operator is defined in a way that allows the transformation to not change any semantic

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Tom Lane
Andrew Dunstan writes: > On 12/12/2014 04:44 PM, Tom Lane wrote: >> Well, it'd be easy to fix if we were willing to invent distinct operators >> depending on which type you wanted out (perhaps ->> for text output as >> today, add ->># for numeric output, etc). > That was my immediate reaction. No

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Andrew Dunstan
On 12/12/2014 04:44 PM, Tom Lane wrote: Josh Berkus writes: Yeah, I believe the core problem is that Postgres currently doesn't have any way to have variadic return times from a function which don't match variadic input types. Returning a value as an actual numeric from JSONB would require re

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Claudio Freire
On Fri, Dec 12, 2014 at 6:44 PM, Tom Lane wrote: > The usability issue could be fixed by teaching the planner to fold a > construct like (jsonb ->> 'foo')::numeric into (jsonb ->># 'foo'). > But I'm not sure how we do that except in a really ugly and ad-hoc > fashion. It would be doable if you co

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Tom Lane
Josh Berkus writes: > Yeah, I believe the core problem is that Postgres currently doesn't have > any way to have variadic return times from a function which don't match > variadic input types. Returning a value as an actual numeric from JSONB > would require returning a numeric from a function wh

Re: [PERFORM] Re: [SQL] querying with index on jsonb slower than standard column. Why?

2014-12-12 Thread Josh Berkus
On 12/08/2014 01:39 PM, Tim Dudgeon wrote: > On 08/12/2014 18:14, Adrian Klaver wrote: >> Recheck Cond: data ->> 'assay1_ic50'::text))::double precision > >> 90::double precision) AND (((data ->> 'assay2_ic50'::text))::double >> precision < 10::double precision)) >> > >> > which means we hav

Re: [PERFORM] 8xIntel S3500 SSD in RAID10 on Dell H710p

2014-12-12 Thread Merlin Moncure
On Wed, Dec 10, 2014 at 2:30 AM, Strahinja Kustudić wrote: > On Wed, Dec 10, 2014 at 4:55 AM, Mark Kirkwood > wrote: >> >> That is interesting: I've done some testing on this type of card with 16 >> (slightly faster Hitachi) SSD attached. Setting WT and NORA should enable >> the so-called 'fastpa