percentile value check can be slow

From: jotpe <jotpe(at)posteo(dot)de>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: percentile value check can be slow
Date: 2017-11-18 09:13:59
Message-ID: 3f60fe5f-6df0-d889-ebad-def2dcb4db57@posteo.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I tried to enter invalid percentile fractions, and was astonished that
it seems to be checked after many work is done?

psql (11devel)
Type "help" for help.

jotpe=# \timing
Timing is on.
jotpe=# select percentile_cont(array[0,0.25,0.5,1,1,null,2]) within
group(order by txk) from klima_tag;
ERROR: percentile value 2 is not between 0 and 1
Time: 19155,565 ms (00:19,156)
jotpe=# select count(*) from klima_tag;
count
----------
13950214
(1 row)

Time: 933,847 ms

Best regards Johannes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-11-18 11:32:55 Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256
Previous Message 高增琦 2017-11-18 02:28:43 Re: no library dependency in Makefile?