Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 10.2
    • Component/s: None
    • Labels:
      None

      Description

      When analyzing skewed data, median can be a better measure than mean.

      Currently this can be implemented with a User Defined Function (e.g. http://www.mooreds.com/wordpress/archives/376), however this requires more overhead when upgrading and deploying database. This can also be handled with a query (e.g. http://stackoverflow.com/questions/1291152/simple-way-to-calculate-median-with-mysql), however that has a performance hit.

      Would adding a new aggregate function be possible?

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            Yes, possible. But it's unlikely that we will have resources to do that anytime soon.

            On the other hand, we'd be happy to apply a patch that implements this function, if someone would provide it to us.

            https://kb.askmonty.org/en/contributing-code/

            Show
            serg Sergei Golubchik added a comment - Yes, possible. But it's unlikely that we will have resources to do that anytime soon. On the other hand, we'd be happy to apply a patch that implements this function, if someone would provide it to us. https://kb.askmonty.org/en/contributing-code/
            Hide
            rspadim roberto spadim added a comment -

            There's many aleeady implemented udf functions, for example
            https://github.com/megastep/mysql-udf?files=1

            Show
            rspadim roberto spadim added a comment - There's many aleeady implemented udf functions, for example https://github.com/megastep/mysql-udf?files=1
            Hide
            rspadim roberto spadim added a comment -

            there's more functions here, very interesting:
            http://mysql-udf.sourceforge.net/

            Show
            rspadim roberto spadim added a comment - there's more functions here, very interesting: http://mysql-udf.sourceforge.net/
            Hide
            jan.reges Ján Regeš added a comment -

            Hi,

            we use UDF function "MEDIAN" from https://github.com/megastep/mysql-udf in our projects and it works well!

            I think, that it could be a built-in part of MariaDB

            Show
            jan.reges Ján Regeš added a comment - Hi, we use UDF function "MEDIAN" from https://github.com/megastep/mysql-udf in our projects and it works well! I think, that it could be a built-in part of MariaDB

              People

              • Assignee:
                Unassigned
                Reporter:
                BenHiles Ben Hiles
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: