MySQL Sort (Order By) Ignored

I’m new to Grafana, using MySQL as a data source in v5.0.4. Whenever I create a table and “order by” the order by is always ignored and it will sort based on the first column only. I believe this was a bug that was fixed in v4.5 (from what i could tell) but it appears to once again be there in the version that I am using. This is a pretty important feature as my users want me to put names/id’s on the left and not the metrics by which I am sorting…is this already a known bug and is there a plan to fix it in v5.0.5? I am hoping that since this bug has already been fixed in the past, it’s an easy fix to port forward into v5 as well.

-Mike.

Hi,

Can you please provide some more information like screenshots/your query and request/response of query inspector.

Thanks

Marcus

Marcus,
You can consider this issue user error :slight_smile: I was not aware that having a sort on the column header in the graph selected would override the order by clause whenever the chart was being refreshed (I’m not even sure when one was set by someone). I found this when I came across reproducing this for you with a test dataset/dashboard to show what was happening. I’ve shut off the “sort” at the column level and now the order by is returning appropriately. Thank you for following up!

-Mike.

1 Like