scrobble.life
#steemsql

SteemSQL - Database updated and ready for SMTs

My work to prepare SteemSQL for the coming SMT and to revamp some table design is now complete.

In my 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.

1. New SMT transactions tables

On top of running on the mainnet, SteemSQL Database Injector has been running in parallel on the testnet to process SMT's operations.

A set of new tables has been created, each one corresponding to the different SMT related transactions that one will be able to issue:

  • TxSMTCreates
  • TxSMTSetRuntimeParameters
  • TxSMTSetSetupParameters
  • TxSMTSetupEmissions
  • TxSMTSetupICOTiers
  • TxSMTSetups

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.

For more information on the different fields contained in these tables, I invite you to read the excellent posts written by @howo on this subject here and here

2. Existing tables revamped

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")

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 _symbol which will contain... the asset symbol ;)

Before:

column type value
vesting_shares varchar(50) 12345.678 VESTS

After:

column type value
vesting_shares numeric(19,6) 12345.678
vesting_shares_symbol varchar(5) VESTS

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.

3. When these changes will occurs?

The new SMT tables are already available.

The switch to the new fields for assets columns will be put into production on 2020-01-31 at 20:00:00 UTC.

This gives about a week to anyone who relies on SteemSQL to adapt their processes.

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 x_ (ex: x_vesting_shares). This means that you can still run your processes, for a maximum of one week, by simply changing the name of the columns in your code. After one week, these x_ columns will be deleted!

Support

If you have any questions or need assistance with SteemSQL, support is provided on the dedicated SteemSQL channel on steem.chat,

You can also contact me directly on steem.chat, Discord or Telegram

Thanks for reading!


Support me and my work for the Steem community.

###

Vote for my witness

Comments · 19

  • @joseph230(59)· 2397d

    Good news! Thank yoi!

  • @crypto.piotr(65)· 2397d

    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

  • @bigtakosensei(68)· 2398d

    Great stuff youre the best

  • @stovehustler(40)· 2398d

    YOU COULDNT HACK A TOASTER

  • @ayijufridar(73)· 2398d

    The explanation is very technical, @arcange. I just hope Steem gets better going forward. Thanks a lot for sharing.

  • @breeyohstlz(25)· 2399d

    Keep the good work guys

    Posted using Partiko Android

  • @boosterke(37)· 2399d

    Looking forward to the future of steem.

  • @theycallmedan(80)· 2399d

    Great work @arcange - Thanks for all that you do!

  • @omrfrq18(43)· 2400d

    Good news for all of us.

  • @raxsafon(26)· 2400d

    Thanks progres! Good proect!

  • @abh12345(80)· 2400d

    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 ;)

  • @jamesndungu(62)· 2400d

    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?

  • @kaminchan(76)· 2400d

    Nice progress!

  • @mehadihasansagor(59)· 2400d

    Good

  • @alauddinsee(56)· 2400d

    Something happen good steemit

    Posted using Partiko Android

  • @pnc(65)· 2400d

    Thks @arcange for the updates. Always on the edge.

  • @scholaris(67)· 2400d

    Thank you for your update @arcange.

  • @taskmaster4450le(81)· 2400d

    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

  • @steem-plus(74)· 2400d

    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.