FYI, the NOLOCK hint is no more required on HiveSQL queries ;)
The TxVotes table is quite big.
For better performances and to lower load on the server , it's better to use a time range in your WHERE clause (ex: timestamp >= '2018-01-01' AND timestamp < '2019-01-01')
instead of YEAR(timestamp) = 2018
.
This will allow the server to use the timestamp index and avoid it to execute the YEAR() function on every row.
Finally, you may take into account the weight of the vote. If it is negative, it's a downvote, not a self-[up]vote.
That being said, I doubt anyone has ever downvoted themselves 😂
Thanks for the tips.
You're welcome.
BTW, as you use it, may I ask you to support the HiveSQL proposal? That would be much appreciated.
You can do it on Peakd, ecency, or using HiveSigner
Thank you!
Done. Sorry I missed that.
Thank you for your support, really appreciate it! 👍