Skip to content
Advertisement

Tag: mariadb

Ranking based on two columns

Finding the Rank of the Particular User from the Database by comparing three columns. Name | Score | Attempts | Time test | 2 | 4 | 2019-01-29 19:50:11 tes2 | 2 | 1 | 2019-01-…

Slow sql statement when using variables

I have the following SQL statement running against a MariaDB 10.1.26 with ~2.000 rows with instant results. When I use the following statement with variables for the datetime fields, the execution takes ~5.5 seconds. The more data rows I have, the longer it takes to execute the statement. Seems like the variables change the behaviour of the statement somehow. What’s

Select query where exists intersection of two list

I have one table that contains two columns: id (integer) list_colum (longtext) – contains json array (e.g. [1, 2, 3]) I want to select all records that have an intersection of my input list. Let me explain: My input is a list – [2, 3] Pseudo code: Is it possible to do this in SQL? I am using the newest

What does VARBINARY(MAX) mean?

I’m trying to port a MSSQL database over to MariaDB and I’ve encountered a table creation using varbinary(max): What would this actually do and is there an equivalent type definition in MariaDB that I could use? Answer As others have stated in the comments, VARBINARY(max) in MSSQL refers to: Variable-length binary data. max indicates that the maximum storage size is

Advertisement