Hi,
I am trying to use the MEDIAN function to calculate median of a column in a Vertica table The following query takes around 75 seconds on a table of 6+ million rows and takes more than 480 seconds (8 minutes) on a view with the same number of rows created by merging two tables.
I have given the query below:
SELECT count(*) as Frequency,
MAX(time) as MaxTime,
AVG(time) as AverageTime,
MAX(MedianCal) as MedianTime
FROM (SELECT time,MEDIAN(time) OVER () as MedianCal FROM table1) AS T1
Is there a way to speed up the median calculation?
Thank you.
Ravi
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.