Questions tagged [innodb]
InnoDB is an ACID-compliant transactional storage engine for MySQL that uses MultiVersion Concurrency Control (MVCC). It has been the default storage engine for MySQL since version 5.5.5
4,425
questions
0
votes
1
answer
34
views
Why can't I use select * to select data rows when mysql innodb adds table write lock?
mysql version is 8.0.30. when i add table write lock, i found that the MDL lock was add .Lock type is SHARED_NO_READ_WRITE.When I execute select * in the locking transaction, the query state ...
0
votes
1
answer
30
views
Is innoDB clustered index always bigger than data size?
In innoDB, the clustered index B+ tree stores data in leaf nodes. I believe it stores the actual data records, not the pointer to data. This is different from postgres, where index leaf node stores ...
1
vote
0
answers
30
views
Innodb Mysql) Fulltext Index has stopped indexing after a certain point in time
I am currently maintaining a live board service and the biggest table that contains all the posts and replies has three full text indexes defined with different columns.
The searching is done in ngram ...
1
vote
1
answer
144
views
how to KNOW if a transaction holds exclusive lock in a row?
I am learning transactions, locks, etc and I want to know how to know if a transaction holds exclusive lock in a row
I tried to simulate it using the MySQL command line, but I'm not sure if it's a ...
-1
votes
0
answers
23
views
Why does changes of Mysql binlog faster than transaction commit?
I'm using canal module of go-mysql library to watch the change of binlog file of mysql database and sync any changes to my kafka message queue. However, when I received an event says one record was ...
0
votes
0
answers
50
views
How does deadlock happen in MySQL, and how to deal with it?
I know maybe this is a frequent question, and I also have searched before asking.But I still have some points cannot figure out myself, help you can help me. Thanks in advance.
How does deadlock ...
0
votes
0
answers
13
views
How do i fix "InnoDB Plugin initialization aborted with error Generic Error" [migrated]
i am running a Nextcloud Server on a Ubuntu 20.04 which was running fine. I wanted to upgrade the Nextcloud Version and make a backup before. This is what i did:
plugged in a external harddrive (/dev/...
1
vote
0
answers
26
views
First query execute on mysql is slow. 2nd on eexecute faster after first execution. why? [closed]
I using a mysql 8.0 innodb table and run a query that joins multiple tables.
In the first pass, the query takes a lot of time to execute and if I run another condition on select with the same query, ...
0
votes
2
answers
81
views
AzerothCore docker install: DB fails with "Upgrade is not supported after a crash or shutdown"
When tryint to install AzerothCore with Docker I had the following error to my ac-database container:
[ERROR] [MY-012526] [InnoDB] Upgrade is not supported after a crash or shutdown with ...
0
votes
1
answer
68
views
MariaDB is not Using Hash Unique Key on InnoDB
I create a table with a text column with unique key:
create table a(id int auto_increment key,a text unique);
And when I run show create table a;, it says that the unique key is using hash:
CREATE ...
0
votes
0
answers
57
views
Strange deadlock using SqlAlchemy + MySql
I use SqlAlchemy + MySql and stuck on a deadlock that I can't understand.
There are a few replicas of app using the same MySql database.
The query to database inserts new row to one table and updates ...
0
votes
0
answers
48
views
How Innodb Concurrency Tickets working in sorting by mysql?
Innodb concurrency tickets how reduced when the sorting performing query running? is tickets applied for sorting or not? If applied how it was calculated by mysql and is there any performance issue ...
0
votes
1
answer
42
views
Obtaining a combined key (year/number) in mysql with innoDB storage engine
I would like to create a combined key in an innoDB table that already has an "ID" column with auto incrementing value that works as primary key.
Assuming we have the following "...
2
votes
0
answers
97
views
MySQL - wrong results when MRR is activated
I dumped a database from a UAT stage and imported it locally.
1. Select with wrong results
Now when I run the following query:
select
*
from
`execution_element_progress`
where
`...
0
votes
1
answer
85
views
Can't create FULLTEXT index on VARCHAR column in MySQL using InnoDB
I am using a MySQL 8 and I have the following table:
CREATE TABLE `media` (
`id` INTEGER NOT NULL AUTO_INCREMENT,
`media_code` VARCHAR(50) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
`systematic` ...
0
votes
2
answers
32
views
How to search entires containg multiple word prefixes in a multi-column fulltext index in MariaDB?
I have a table storing person names
CREATE TABLE `person` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(100) NOT NULL,
`last_name` varchar(100) NOT NULL,
PRIMARY KEY (`...
1
vote
1
answer
72
views
How to investigate active MySQL transactions that are not visible in processlist?
We have a Java application that works with MariaDB 10.4.28 hosted in AWS RDS.
We have a situation that application went down with reason "CannotCreateTransactionException". The pool has 40 ...
1
vote
0
answers
88
views
Select * for update too slow
I have this code as a distributed lock implementation in a Spring app using Mysql as DB.
@Transactional(propagation = Propagation.MANDATORY, isolation = Isolation.READ_COMMITTED)
public void ...
0
votes
0
answers
32
views
Is CPU frequency the only limiting factor for single threaded MySQL performance
I am running MySQL 5.7/InnoDB and want to optimize single-threaded select performance. The the database is mixing OLTP/OLAP queries and heavy OLAP queries frequently max out single cores for multiple ...
0
votes
1
answer
64
views
MySQL errno: 24 - Too many open files
MySQL 5.7.36-39-log Percona Server
Have recently received: errno: 24 - Too many open files
I have observed that status open_files is continually increasing. This is new behavior as the number of ...
1
vote
1
answer
83
views
MariaDB columnstore table join innodb table
I know that this kind of join is supported, but it doesn't work for me for the next case;
Given the tables:
CREATE TABLE person_cs(
firstName VARCHAR(255),
lastName VARCHAR(255),
address ...
0
votes
0
answers
89
views
A deadlock caused by the duplicate-key error, "X insert intention waiting ... X locks rec but not gap" vs "S locks rec but not gap waiting"
I am debugging a deadlock caused by the duplicate-key error. According to MySQL document,
If a duplicate-key error occurs, a shared lock on the duplicate index
record is set. This use of a shared ...
5
votes
1
answer
269
views
How to initialize InnoDB Cluster created via Kubernetes mysql-operator through simple script.sql
I've successfully deployed in Kubernetes a InnoDB Cluster via mysql-operator and I've also set up the scheduled backup. I'm also able to init the DB via the same backup created by InnoDB.
However I ...
-1
votes
1
answer
37
views
innodb missing auto-increment values [duplicate]
I am not experienced in this area. Can you tell me why autoincrement skips values?
This is my table:
CREATE TABLE `orders`
(
`id` int NOT NULL AUTO_INCREMENT,
`product_id` int NOT NULL,
`...
0
votes
0
answers
31
views
Cant change charset of database
Now I have character set utf8mb3 for my database. I want to change it to utf8mb4. For this task, I create a script, that creates SQL script, that doing it. This script can generate rows like this:
...
1
vote
1
answer
78
views
How to speed up altering storage engine and DB export/import in MySQL
I have a MySQL database with around 250GB of data running on Linux platform (12GB Ram).
I am upgrading MySQL to 8.0.32 from 5.7.42-1 and to do so, altering one of the largest table with partitioning ...
0
votes
1
answer
43
views
I'm having an innodb endless transaction problem
I am using MariaDB version 11.0.2 and I am having the following problem. I cannot perform any operation on the related row in the database. The transaction text below does not go in any way. I don't ...
0
votes
1
answer
66
views
Can we select the time the current transaction began?
Does MySQL (InnoDB) provide a way to select the moment the current transaction was started?
Of course, we could somehow capture the time manually, but the idea is to avoid the need for running an ...
-1
votes
1
answer
66
views
Does changing MYSQL table engine from MYISAM to INNODB can cause a data corruptions?
I have a simple question.
I have a mysql databases. I have 2 tables, that uses MYISAM, I want to change to INNODB, one of the table has 1.000 rows, if I do this this change, is there a risk that it ...
0
votes
1
answer
30
views
transaction isolation, record locks and concurrent insertions in table
I have several processes trying to insert the same data into an InnoDB MySQL table.
This table is basically
id : int primary autoincrement
name: varchar(100)
For historical reasons, there is no ...
1
vote
1
answer
94
views
Cant create extra table entries in mysql database tables after I reach a limit of about 10000 entries for mysql database hosted on inodb sql server
I have a Laravel application that writes and reads from a mysql database setup on innodb sql serve in ubuntu server. The application is a multi-tenant application and has at least 10 tenancies that ...
0
votes
0
answers
197
views
MySQL - Transaction deadlock - Waiting for the metadata lock even after Server Restart
We have a MySQL (8.0.X-google) version in GCP which holds few databases. Recently we are stuck due to the "Waiting for table metadata lock" error for the alter query on one of the table.
...
1
vote
1
answer
118
views
MySQL 8. Tables created too slowly
Empty server. Ubuntu 22.04
Empty database. MySQL 8.0.33.
InnoDB tables
Why each table creation lasts from 0.6 to 1 sec.
There are only 3-4 columns. Without data.
mysql> show profile for query 1;
+...
0
votes
3
answers
116
views
Why are these concurrent transactions causing a deadlock? (mysql 8.0 innoDB)
Let's say we have the following table
CREATE DATABASE IF NOT EXISTS humans;
USE humans;
CREATE TABLE IF NOT EXISTS address (
last_name VARCHAR(255) NOT NULL,
address VARCHAR(255),
PRIMARY ...
1
vote
1
answer
111
views
MySQL: SELECT ... FOR UPDATE creates unexpected deadlock
Our application performs multiple identical requests using SELECT … FOR UPDATE and ends-up deadlocking each other. I thought using FOR UPDATE should serialize the request, forcing the second one to ...
-1
votes
1
answer
59
views
MySQL - simple query sometime cases infinite loop & continuously incrementing number of rows_fetched
I’ve been struggling last 4 weeks figuring out why a query intermittently execute forever on Docker Mysql Percona Distribution (percona:8.0.32-24, empty my.cnf). This postscript query runs after the ...
0
votes
1
answer
72
views
Deadlock in MySQL(5.7) InnoDB
There is a MySQL(5.7) InnoDB table:
CREATE TABLE `sample_table`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`status` varchar(63) ...
0
votes
0
answers
41
views
How can I do or operator(number a | number b) in MariaDB (InnoDB Engine)?
I tried to do or operator (aka |) in MariaDB (InnoDB Engine).
When I tried or operator with negative number, I got a wrong result.
Ex) SELECT -1107296257 | -8388608 => result : 18446744073709551615
...
0
votes
0
answers
43
views
Why aiomysql closing connection when conn.get_transaction_status() is True after I set isolation level twice?
I found that connection will close after I set isolation level twice.
I accidentally set this twice and found a unexpected behavior. ( at least, I do not expect that.
After I set some log, I found the ...
0
votes
1
answer
76
views
System versioned table duplicate rows
I have tables (MariaDB 10.5.19; InnoDB) that I update periodically with data from an API.
Since I enabled system_versioning however, I get a new row, even if all columns keep their same value. I want ...
0
votes
0
answers
88
views
How to change the value of innodb_lock_wait_timeout from hibernate
We are using AWS Aurora 2.x database ( compatible with MySQL 5.7 ). From our application, we are interacting with database using hibernate. In one scenario, we want to use a custom value instead of ...
0
votes
0
answers
47
views
Windows XAMP MySQL issue
While importing a database, SQL suddenly stopped working. The error log is below. Does anyone know what I should do?
I tried to fix it again from the Backup folder but it didn't work unfortunately
...
0
votes
1
answer
63
views
How to increase select performance on a 15 million row MyISAM table converted to InnoDB
MySQL Version 8.0.32-0ubuntu0.20.04.2
I'm trying to improve SELECT performance, not circumvent doing a SELECT.
CREATE TABLE big_table (
pk INT AUTO_INCREMENT PRIMARY KEY,
field1 VARCHAR(255),
field2 ...
0
votes
0
answers
160
views
Modifying CTFd database
I'm trying to automate CTFd deployment using terraform and aws. My problem is that i'm trying to modify the default db of CTFd so i don't have to create the event and admin user manually and instead ...
0
votes
0
answers
35
views
Laravel MySQL Full text search InnoDB Relevancy Calculation for multiple rows with same number of occurences in total
using mysql from xaamp v8.1.10 along with laravel v5.5.3.
Full text Search Index enabled in table 'ex1' for column 'des' and 'ft_min_word_len = 1'.
laravel query:
$string='pink item product';
$result ...
-1
votes
2
answers
61
views
Is it sensible to create a different table for the same data for each date?
I have a MYSQL InnoDB table table with the following columns (table and column names changed):
date (PK, DATE)
var_a (PK, FK, INT)
var_b (PK, FK, INT)
rel_ab (DECIMAL)
where rel_ab is a column that ...
0
votes
1
answer
97
views
Need inputs to optimize Big size Mysql - Innodb Table
Number of records in table_abc: 236,364,206
Yearly Records:
Year Number of records
2009 1
2011 4
2012 8
2013 25
2014 70
2015 175
2016 393
2017 1010
2018 332086
2019 ...
0
votes
1
answer
112
views
Infix search in MySQL (search with pattern in the middle) with an index
I have a MySQL 8 InnoDB compressed table, with an index:
set global innodb_file_per_table=1;
create table t (id int primary key auto_increment,
key varchar(200), value varchar(200))
...
0
votes
1
answer
33
views
Speed up LIKE queries without words language
I have a table with 3 columns of VARCHAR.
I want to do a query to search if an alphanumeric string is contented in these 3 columns. Such as :
LIKE '%whatever%' but speed up.
I have seen the use of ...
1
vote
0
answers
183
views
I have a question about deadlocks on MySQL 8.0
I'm using MySQL version 8.0.26 and transaction isolation is the default value REPEATABLE-READ.
Here is my table
create table test
(
id int auto_increment primary key,
a ...