Problem
Sometimes you want to get info about performance and execution time of your SQL queries but if you use SteemSQL Wrapper API then you need to calculate the time of each request yourself. It is very simple to do but you need to calculate it for each request and each project which you have.
Solution
So I updated SteemSQL Wrapper API and now each response returns also the execution_time field which has the execution time of your SQL in seconds.
cURL Example:
curl \
-d '{"query": "SELECT COUNT(*) as accounts FROM TxAccountCreates"}' \
https://sql.steemhelpers.com/api
Response:
{
"headers": ["accounts"],
"rows": [{"accounts": 591622}],
"error": null,
"execution_time": 0
}
In the most of simple queries, you will get execution_time: 0 and in fact if you are developing some app using SteemSQL Wrapper API (actually this point is related to any external resources which you use to get Steemit data in your project) then you need to aim to exactly this result.
However, for example, the next query sometimes can return execution_time: 5
SELECT TOP 30 author, category, net_votes, title, url
FROM Comments
WHERE depth=0 AND created >= '2017/12/20' AND created < '2018/01/15'
ORDER BY net_votes DESC
Frontend
But it is only a part of the update. Information about execution time of your SQL queries is also useful if you do not use API and use only the web interface. In fact, in the web interface it is even more useful than in API, especially if you only learn SQL and do not know enough about optimizations. So now after each request you will see the Execution time card.
SteemSQL Wrapper
SteemSQL Wrapper allows use SteemSQL right in your browser without any dependencies. It even allows using the several most popular queries with one click. It means that non-tech users no longer need to install any drivers/Excel and learn programming languages. They can just go to SteemSQL Wrapper and write any SQL queries to get results right in their browser. Moreover, the project displays the database structure and users can know exactly what tables and columns they need and how to create analyses which they want.
Posted on Utopian.io - Rewarding Open Source Contributors