🐈
zeeSQL
  • zeeSQL, SQL and search by value for Redis. Fast, Simple and Reliable.
  • How to
    • How to choose between QUERY and EXEC
    • know-what-secondary-indexes-are defined
    • How to load zeeSQL in Redis
    • How to check if an index is used in zeeSQL and SQLite
    • know-what-secondary-indexes-are defined
    • create-an-index
    • create-a-view
    • create-a-secondary-index
    • How to create a trigger
    • quickly-ingest-data
    • How to copy a database
    • get-help
    • work-with-dates
    • using-full-text-search
    • work-with-json
    • How to create a new database in zeeSQL
    • How to create a new table in zeeSQL
    • know-what-tables-are-defined
    • know-what-databases-are-defined
    • works-with-boolean
    • How to get zeeSQL
    • How to get JSON output
    • add-multiple-rows
  • blog
    • node
      • Using RediSQL with Node.js
    • JSON on Redis via RediSQL, SQL steroids for Redis
    • golang
      • Using RediSQL with Go(lang)
    • Doubling the performances of RediSQL, SQL steroids for Redis.
    • zeeSQL now runs on SQLite 3.35
    • Query Redis on two attributes
    • RediSQL for analytics
    • Copying RediSQL databases
    • Release 0.9.0 of RediSQL, SQL steroids for Redis
    • Release 0.8.0 of RediSQL, SQL steroids for Redis
    • Release 0.7.0 of RediSQL, SQL steroids for Redis
    • JSON on Redis via RediSQL, SQL steroids for Redis
    • Release 0.6.0 of RediSQL, SQL steroids for Redis
    • python
      • using-redisql-with-python
    • Release 0.5.0 of RediSQL, SQL steroids for Redis
  • References
  • zeeSQL commits to backward compatibility
  • zeeSQL, a solid product for busy developer
  • zeeSQL and secondary indexes, how to search Redis key by value
  • Tutorial
  • Pricing for zeeSQL
  • Why you should migrate from RediSQL to zeeSQL
  • FAQs
  • Motivation
Powered by GitBook
On this page
  • RediSQL, Redis on SQL steroids.
  • Motivation
  • How to use
  • Implementation

Was this helpful?

  1. blog

Release 0.9.0 of RediSQL, SQL steroids for Redis

PreviousCopying RediSQL databasesNextRelease 0.8.0 of RediSQL, SQL steroids for Redis

Last updated 4 years ago

Was this helpful?

RediSQL, Redis on SQL steroids.

RediSQL is a Redis module that provides full SQL capabilities to Redis, it is the simplest and fastest way to get an SQL database up and running, without incurring in difficult operational issues and it can scale quite well with your business.

The fastest introduction to RediSQL is

tl;dr This release introduce one simple new command REDISQL.STATISTICS. The new command returns the amount of time each command is been called and how many of those calls were successfully and how many returned errors. The command does not introduce noticeable slowdowns.

This release is the smallest, however it provide the foundation for the next major releases.

Motivation

The infrastucture behind the REDISQL.STATISTICS commands is needed for the next major release of RediSQL.

Moreover it provides an useful tool for the administrator of the instance allowing them to spot inefficiencies.

How to use

Just invoke the command without any arguments to get an array of all the counters, extra arguments are ignored for the moment.

After using RediSQL for few commands, the output of REDISQL.STATISTICS could be the following.

127.0.0.1:6379> REDISQL.STATISTICS
 1) 1) "CREATE_DB"
    2) (integer) 1
 2) 1) "CREATE_DB OK"
    2) (integer) 1
 3) 1) "CREATE_DB ERR"
    2) (integer) 0
 4) 1) "EXEC"
    2) (integer) 4
 5) 1) "EXEC OK"
    2) (integer) 4
 6) 1) "EXEC ERR"
    2) (integer) 0
 7) 1) "QUERY"
    2) (integer) 0
 8) 1) "QUERY OK"
    2) (integer) 0
 9) 1) "QUERY ERR"
    2) (integer) 0
10) 1) "QUERY.INTO"
    2) (integer) 0
11) 1) "QUERY.INTO OK"
    2) (integer) 0
12) 1) "QUERY.INTO ERR"
    2) (integer) 0
13) 1) "CREATE_STATEMENT"
    2) (integer) 3
14) 1) "CREATE_STATEMENT OK"
    2) (integer) 1
15) 1) "CREATE_STATEMENT ERR"
    2) (integer) 2
16) 1) "EXEC_STATEMENT"
    2) (integer) 2
17) 1) "EXEC_STATEMENT OK"
    2) (integer) 2
18) 1) "EXEC_STATEMENT ERR"
    2) (integer) 0
19) 1) "UPDATE_STATEMENT"
    2) (integer) 2
20) 1) "UPDATE_STATEMENT OK"
    2) (integer) 1
21) 1) "UPDATE_STATEMENT ERR"
    2) (integer) 1
22) 1) "DELETE_STATEMENT"
    2) (integer) 0
23) 1) "DELETE_STATEMENT OK"
    2) (integer) 0
24) 1) "DELETE_STATEMENT ERR"
    2) (integer) 0
25) 1) "QUERY_STATEMENT"
    2) (integer) 0
26) 1) "QUERY_STATEMENT OK"
    2) (integer) 0
27) 1) "QUERY_STATEMENT ERR"
    2) (integer) 0
28) 1) "QUERY_STATEMENT.INTO"
    2) (integer) 0
29) 1) "QUERY_STATEMENT.INTO OK"
    2) (integer) 0
30) 1) "QUERY_STATEMENT.INTO ERR"
    2) (integer) 0
31) 1) "COPY"
    2) (integer) 0
32) 1) "COPY OK"
    2) (integer) 0
33) 1) "COPY ERR"
    2) (integer) 0

The CERATE_DB line means that the REDISQL.CREATE_DB command is been invoked once. The CREATE_DB OK lines means that the command succeeded once.

Let's analyze the CREATE_STATEMENT lines as well.

13) 1) "CREATE_STATEMENT"
    2) (integer) 3

This line says that the command is been invoked 3 times.

14) 1) "CREATE_STATEMENT OK"
    2) (integer) 1

The next line specify that the commands completed successfully 1 time out of 3.

15) 1) "CREATE_STATEMENT ERR"
    2) (integer) 2

The last line confirms that out of the 3 times we invoked the command, 2 of them failed for some reason.

Of course the math need to check out and the sum of successful and erroneous runs should match with the number of invocation.

Implementation

This command is implemented with atomic counters, they are fast and provide a simple and easy way to manage concurrent access.

We careful tested the performance to make sure that the slowdown introduces by the counter is not noticeable.

our homepage