<p dir="auto">My work to prepare SteemSQL for the coming SMT and to revamp some table design is now complete.
<p dir="auto">In my <a href="/steemsql/@arcange/steemsql-database-update-and-preparation-for-smts">previous post about SteemSQL database changes, I announced I will prepare SteemSQL's database for SMTs and taking the opportunity to also make additional modifications to improve the performance of SteemSQL for (d)Apps and processes that use SteemSQL.
<h5>1. New SMT transactions tables
<p dir="auto">On top of running on the mainnet, SteemSQL Database Injector has been running in parallel on the testnet to process SMT's operations.
<p dir="auto">A set of new tables has been created, each one corresponding to the different SMT related transactions that one will be able to issue:
<ul>
<li>TxSMTCreates
<li>TxSMTSetRuntimeParameters
<li>TxSMTSetSetupParameters
<li>TxSMTSetupEmissions
<li>TxSMTSetupICOTiers
<li>TxSMTSetups
<p dir="auto">These tables will start to be populated as soon as SMT will be released. In the meantime, you can already take a look at it to get used to their structure.
<p dir="auto"><a href="/proposal/@howo/smt-hard-fork-testing-report-3-400-000-smts-are-live-on-the-testnet">here and <a href="/smt/@howo/the-emission-operation-explained">here<span>For more information on the different fields contained in these tables, I invite you to read the excellent posts written by <a href="/@howo">@howo on this subject
<h5>2. Existing tables revamped
<p dir="auto">One of SteemSQL's weak points in terms of performance is the fact that many fields containing value for assets are stored in the database as character strings. This is mainly because, during the initial design of the database, I wanted to stick 1:1 to the structure of the data returned by the Steem nodes. And they return amounts as a numeric value followed by its symbol (ex: "1234.123 STEEM" or "654.456 SBD")
<p dir="auto">In its updated design, the database will now store assets value in two separate columns, the first one with the same name containing the numerical value and a second one suffixed with <code>_symbol which will contain... the asset symbol ;)
<p dir="auto"><em>Before:
<div class="table-responsive"><table>
<thead>
<tr><th>column<th>type<th>value
<tbody>
<tr><td>vesting_shares<td>varchar(50)<td>12345.678 VESTS
<p dir="auto"><em>After:
<div class="table-responsive"><table>
<thead>
<tr><th>column<th>type<th>value
<tbody>
<tr><td>vesting_shares<td>numeric(19,6)<td>12345.678
<tr><td>vesting_shares_symbol<td>varchar(5)<td>VESTS
<p dir="auto">This change will allow me to create additional indexes on assets columns to speed up the user's queries and lower resource usage on the server.
<h5>3. When these changes will occurs?
<p dir="auto">The new SMT tables are already available.
<p dir="auto">The switch to the new fields for assets columns will be put into production on <strong>2020-01-31 at 20:00:00 UTC.
<p dir="auto">This gives about a week to anyone who relies on SteemSQL to adapt their processes.
<p dir="auto">If this deadline is still too short for you, SteemSQL will make the old content of the fields available for a week in an additional column prefixed with an <code>x_ (ex: x_vesting_shares). This means that you can still run your processes, <strong>for a maximum of one week, by simply changing the name of the columns in your code. After one week, these <code>x_ columns will be deleted!
<h3>Support
<p dir="auto">If you have any questions or need assistance with SteemSQL, support is provided on the dedicated <a href="https://steem.chat/channel/steemsql" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemSQL channel on steem.chat,
<p dir="auto">You can also contact me directly on <a href="https://steem.chat/direct/arcange" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">steem.chat, <a href="https://discordapp.com/channels/@me/237480770933882881" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Discord or <a href="https://t.me/the_arcange" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Telegram
<p dir="auto">Thanks for reading!
<hr />
<h3><center>Support me and my work for the Steem community.
<h3><center><a href="https://beta.steemconnect.com/sign/account-witness-vote?witness=arcange&approve=1" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Vote for my witness
Great!
cast(left(a.vesting_shares, len(vesting_shares)-6) as float)*RATE/1000000
will soon be
vesting_shares*RATE/1000000
A little easier to read and a bit quicker, although I'm sure it's not the bottleneck in most of my queries ;)
Something like that, yeah =)
BTW, you shouldn't underestimate string manipulation overhead when you apply it to thousands or millions of rows.
This is great news. Glad to see you are on top of things as always.
Now we just need some news about SMTs from Steemit Inc.
Posted via Steemleo
Thank you @taskmaster4450le
Tests for SMTs are still going on and the testnet has been crashed several times.
I really believe this will make it kind of bullet-proof. Better to crash it now than when put into production.
Something happen good steemit
Posted using Partiko Android
Hi, @arcange!
You just got a 1.01% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
Thank you for your update @arcange.
Thks @arcange for the updates. Always on the edge.
Good
Nice progress!
This is great news for the steemit community, steem adoption of SMT gives it a competitive advantage compared with the leading blockchains. My question is, how are you guys solving the problem of scalability?
On which aspects of the platform do you anticipate a scalability problem?
real time performance, i know steemit processes more transactions than any other blockchains, but with the launch of SMT there would be an increase in the number of transactions, so i’m just concerned on the real time performance.
If you look at blocktivity, you will see that Steem Capacity Utilization Index is at the bottom, which means that we have a lot of reserve in the network for a higher transaction volume.
We have already exceeded 2.5 million transactions per day (~ 3x the current volume) and performance was absolutely not a concern at that time, so I am not worried about scalability.
Thanks progres! Good proect!
Good news for all of us.
Great work @arcange - Thanks for all that you do!
Thank you =)
Looking forward to the future of steem.
Keep the good work guys
Posted using Partiko Android
The explanation is very technical, @arcange. I just hope Steem gets better going forward. Thanks a lot for sharing.
YOU COULDNT HACK A TOASTER
Great stuff youre the best
Dear @arcange
I've been wondering, what will be main difference between SMTs and SE (from user point of few) and I'm not sure if there will be many differences that would really matter.
I was already told that in order to purchase or sell SMT - one would still need to have his own account on STEEM blockchain. That first buyer will still need to purchase STEEM and only then trade it to SMT. Which means, that price of our tokens will still depend on price of STEEM. Any idea if it's true?
Yours
Piotr
You're right, from a pure user's point of view, there won't be many differences
Whether with SE or SMT, you will need a STEEM account anyway because SE uses Steem custom_json operations.
On Steem Engine, a user will need to buy STEEM then buy STEEMP(pegged/backed with STEEM) before being able to buy a SE token
With SMT, a user will be able to directly buy any token once he/she as STEEM.
Finally, saying that a token price depends on STEEM price is not both correct and incorrect. It depends on the intrinsic value of the token.
Let's say 1 TOKEN as a value of 1 STEEM and 1 STEEM is $1, so you basically can say that your TOKEN value is $1
Then the value of STEEM falls down to $0.5.
Without changing the intrinsic value of TOKEN, you now need 2 STEEM to buy 1 TOKEN (which still worth $1)
But if you consider TOKEN value kind of pegged to STEEM, then yes, its value is STEEM dependent.
Good news! Thank yoi!