This ProxySQL post is sourced from an error I faced recently ProxySQL has become one of the popular choice as the “proxy” for MySQL databases. This post is tipping you…
10 Older Entries »
.NET Core 3 .NET Core was presented by Microsoft in 2016, but its 1.x versions had limited set of features comparing to Full .NET Framework. Since then .NET Core has been drastically improved. .NET Core 2.0 has a significant part of Full .NET Framework features and includes new functionality and significant performance optimizations. This year, […]
Ready to transition from a commercial database to open source, and want to know which databases are most popular in 2019? Wondering whether an on-premise vs. public cloud vs. hybrid cloud infrastructure is best for your database strategy? Or, considering adding a new database to your application and want to see which combinations are most popular? We found all the answers you need at the Percona Live event last month, and broke down the insights into the following free trends reports:
- Top Databases Used: Open Source vs. Commercial
- Cloud Infrastructure Analysis: Public Cloud vs. On-Premise vs. Hybrid Cloud
- Polyglot Persistence Trends: …
Vadim was recently having a little Saturday morning fun solving Sudoku using MySQL 8. The whole idea comes from SQLite, where Richard Hipp has come up with some outlandish recursive query examples — WITH clause.
The SQLite query:
WITH RECURSIVE input(sud) AS ( VALUES('53..7....6..195....98....6.8...6...34..8.3..17...2...6.6....28....419..5....8..79') ), digits(z, lp) AS ( VALUES('1', 1) UNION ALL SELECT CAST(lp+1 AS TEXT), lp+1 FROM digits WHERE lp<9 ), x(s, ind) AS ( SELECT sud, instr(sud, '.') FROM input UNION ALL SELECT …[Read more]
But the real magic happens on the backend. This is the ecosystem that really powers your website. One writer has articulated this point very nicely as follows:
The technology and programming that “power” a site—what your end user doesn’t see but what makes the site run—is called the back end. Consisting of the server, the database, and the server-side applications, it’s the behind-the-scenes functionality—the brain of a site. …[Read more]
SQLite is really a good tool to set up quick proof of concepts and small applications; however it’s not the most robust solution on the market for working with relational databases. In the open source community two databases take the top of the list: PostgreSQL and MySQL.
I did a small project for my studies. I was using SQLite as I didn’t need much out of it. Curious, I decided to see how the application would behave on other databases and decided to try PostgreSQL and MySQL. I had two problems to solve, and this post is about the first one: how to deal with the migrations. They were as follows:
Active Record automatically put the field
id in all
of its tables, that’s why it is omitted on the migrations.
In PostgreSQL it …[Read more]
ProxySQL allows you to connect to its admin interface using the MySQL protocol and use familiar tools, like the MySQL command line client, to manage its configuration as a set of configuration tables. This ability may trick you into thinking that you’re working with a stripped-down MySQL server – and expect it to behave like MySQL.
It would be a mistake to think this! In fact, ProxySQL embeds the SQLite database to store its configuration. As such, it behaves much closer to SQLite!
Below, I’ll show you a few things that confused me at first. All of these are as of ProxySQL 1.3.6 (in case behavior changes in the future).
Fake support for Use command…[Read more]
I think SQL is a very simple language, but ofcourse I'm
But even a simple statement might have more complexity to it than you might think.
Do you know what the result is of this statement?
SELECT FALSE = FALSE = TRUE;
scroll down for the answer.
The answer is: it depends.
You might expect it to return false because the 3 items in the comparison are not equal. But that's not the case.
In PostgreSQL this is the result:
postgres=# SELECT FALSE = FALSE = TRUE; ?column? ---------- t (1 row)
So it compares FALSE against FALSE, which results in TRUE and then That is compared …[Read more]
Today I got asked from a friend about the differences between SQLite and MySQL and in which cases it is better to use the first or the latter one. You can’t really compare these two, I will try to explain why this is the case and when it is better to use the first or the latter.
SQLite is a single-file based database which is useful for testing and for embedding in applications. This means that all the information is stored in a single file on a file system and you use a SQLite library to open this file to read and write your data.
MySQL is a database server which got different forms to store its data (engines) and will server the data to request comming from applications who connect to it.
- Fast setup. You only need to include a library into your app.
- Embedded. No need to think about …
I was digging through some old project code and found this script. Sometimes one finds oneself in an odd situation and needs to convert regular SQL, say from a MySQL database dump, into SQLite3 format. There’s not too much else to say, but here is a script that helps with the process. It can likely be improved but this handles the items that came up during conversion on initial runs.
#!/bin/sh #### # NAME: convert-mysql-to-sqlite3.sh # AUTHOR: Matt Reid # DATE: 2011-03-22 # LICENSE: BSD #### if [ "x$1" == "x" ]; then echo "Usage: $0 " exit fi cat $1 | grep -v ' KEY "' | grep -v ' UNIQUE KEY "' | grep -v ' PRIMARY KEY ' | sed '/^SET/d' | sed 's/ unsigned / /g' | sed 's/ auto_increment/ primary key autoincrement/g' | sed 's/ smallint([0-9]*) / integer /g' | sed 's/ tinyint([0-9]*) / integer /g' | sed 's/ int([0-9]*) / integer /g' | sed 's/ character set [^ ]* / /g' | sed 's/ enum([^)]*) / varchar(255) /g' | sed 's/ on …[Read more]
10 Older Entries »