Forum: Building VoltDB Applications

Post: PERCENTILE like Function: Sort the data

PERCENTILE like Function: Sort the data
skk
Jul 18, 2013
Hi

I was wondering whether it is possible to sort the data in VoltDb. VoltDB, it seems, does not support both Percentile and Order by DESC etc. Can anyone point me to the right solution.

Thanks
SK
pmartel
Jul 18, 2013
VoltDB does not currently support percentile or windowing functions in general, but it does have support for ORDER BY ... DESC.

If you wish to post some sample queries that aren't working for you, we might be able to identify the specific issue you are having with each.
If we know the specific case and symptoms, we may be able to offer some advice or a fix or workaround for your ORDER BY ... DESC issue.

For the percentile issue, the more informed we can be about user interest in specific unsupported use cases, the more effective we can be in planning and prioritizing future development.
We may also be able to suggest short-term workarounds for the missing features.

Thanks,
Paul Martel
VoltDB Engineer
skk
Jul 19, 2013
Hello Paul

Sorry for the mistake. ORDER BY DESC works.
The main issue behind using percentile is that before we start data analysis we need to sort the columns in the table and find out how is the distribution of data. Using percentile we are able to find out how the data varies and the different values that are present at different percentile values.

-SKK
pmartel
Jul 19, 2013
SKK,

I'm happy to hear that you were able to work out your sorting issue.

Some members of our team were recently discussing percentile queries in the context of the related issue of optimizing certain rank-based queries.
There are internal features of VoltDB that might be useful for optimizing rank or percentile queries on single-partition replicated data.
Querying for percentiles or by rank over partitioned data is much more difficult to do without sacrificing transactional consistency and/or efficiency of the query itself and/or concurrent system throughput.
The best compromise solutions appear to depend very much on the detailed requirements of each particular application.

This is why we value hearing details about particular practical examples, so we can design and prioritize product features and best practices to serve the most common use cases.
We'd be happy to learn more about your particular use case and your application in general.

Thanks for using VoltDB.
--paul