patternMinor
MariaDB 10.6 Performace
Viewed 0 times
performacemariadbstackoverflow
Problem
I'm migrating my database more to my surprise I had a drop in the performance search, I already checked all the indexes of the tables and they are the same
Server New
MariaDB 10.6.8
CentOS 7
8 VCpu 2.8
16 RAM
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
NON_UNIQUE
INDEX_SCHEMA
INDEX_NAME
SEQ_IN_INDEX
COLUMN_NAME
COLLATION
CARDINALITY
SUB_PART
PACKED
NULLABLE
INDEX_TYPE
COMMENT
INDEX_COMMENT
IGNORED
def
shop
nfe
0
shop
PRIMARY
1
fk_venda
A
389502
BTREE
NO
def
shop
nfe
0
shop
fk_venda
1
fk_venda
A
194751
BTREE
NO
def
shop
nfe
1
shop
numero
1
numero
A
194751
BTREE
NO
def
shop
vendas
0
shop
PRIMARY
1
id_venda
A
120978
BTREE
NO
def
shop
vendas
0
shop
codigo
1
codigo
A
120978
YES
BTREE
NO
def
shop
vendas
0
shop
guid
1
guid
A
120978
YES
BTREE
NO
def
shop
vendas
0
shop
erp
1
fk_loja
A
2
YES
BTREE
NO
def
shop
vendas
0
shop
erp
2
erp
A
15122
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
1
id_venda
A
120978
BTREE
NO
def
shop
vendas
1
shop
vendas
2
fk_loja
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
3
fk_cliente
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
4
fk_frete
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
5
fk_status
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
fk_loja
1
fk_loja
A
2
YES
BTREE
NO
def
shop
vendas
1
shop
fk_cliente
1
fk_cliente
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
fk_frete
1
fk_frete
A
72
YES
BTREE
NO
def
shop
vendas
1
shop
fk_status
1
fk_status
A
26
YES
BTREE
NO
def
shop
vendas
1
shop
fk_cupom
1
fk_cupom
A
2
YES
BTREE
NO
def
shop
vendas
1
shop
fk_estado
1
fk_estado
A
52
YES
BTREE
NO
def
shop
vendas
1
shop
fk_pais
1
fk_pais
A
2
YES
BTREE
NO
def
shop
vendas
1
shop
fk_pagamento
1
fk_pagamento
A
38
YES
BTREE
NO
def
shop
vendas
1
shop
phpsessid
1
phpsessid
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
notificar
1
notificar
A
4
YES
BTREE
NO
def
shop
vendas
1
shop
vendas_ibfk_9
1
fk_marketplace
A
48
YES
BTREE
NO
def
shop
vendas
1
shop
data_compra
1
data_compra
A
120978
Y
Server New
MariaDB 10.6.8
CentOS 7
8 VCpu 2.8
16 RAM
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
NON_UNIQUE
INDEX_SCHEMA
INDEX_NAME
SEQ_IN_INDEX
COLUMN_NAME
COLLATION
CARDINALITY
SUB_PART
PACKED
NULLABLE
INDEX_TYPE
COMMENT
INDEX_COMMENT
IGNORED
def
shop
nfe
0
shop
PRIMARY
1
fk_venda
A
389502
BTREE
NO
def
shop
nfe
0
shop
fk_venda
1
fk_venda
A
194751
BTREE
NO
def
shop
nfe
1
shop
numero
1
numero
A
194751
BTREE
NO
def
shop
vendas
0
shop
PRIMARY
1
id_venda
A
120978
BTREE
NO
def
shop
vendas
0
shop
codigo
1
codigo
A
120978
YES
BTREE
NO
def
shop
vendas
0
shop
guid
1
guid
A
120978
YES
BTREE
NO
def
shop
vendas
0
shop
erp
1
fk_loja
A
2
YES
BTREE
NO
def
shop
vendas
0
shop
erp
2
erp
A
15122
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
1
id_venda
A
120978
BTREE
NO
def
shop
vendas
1
shop
vendas
2
fk_loja
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
3
fk_cliente
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
4
fk_frete
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
vendas
5
fk_status
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
fk_loja
1
fk_loja
A
2
YES
BTREE
NO
def
shop
vendas
1
shop
fk_cliente
1
fk_cliente
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
fk_frete
1
fk_frete
A
72
YES
BTREE
NO
def
shop
vendas
1
shop
fk_status
1
fk_status
A
26
YES
BTREE
NO
def
shop
vendas
1
shop
fk_cupom
1
fk_cupom
A
2
YES
BTREE
NO
def
shop
vendas
1
shop
fk_estado
1
fk_estado
A
52
YES
BTREE
NO
def
shop
vendas
1
shop
fk_pais
1
fk_pais
A
2
YES
BTREE
NO
def
shop
vendas
1
shop
fk_pagamento
1
fk_pagamento
A
38
YES
BTREE
NO
def
shop
vendas
1
shop
phpsessid
1
phpsessid
A
120978
YES
BTREE
NO
def
shop
vendas
1
shop
notificar
1
notificar
A
4
YES
BTREE
NO
def
shop
vendas
1
shop
vendas_ibfk_9
1
fk_marketplace
A
48
YES
BTREE
NO
def
shop
vendas
1
shop
data_compra
1
data_compra
A
120978
Y
Solution
Three possibilities that I can think of:
-
-
I assume that
-
-
vendas: Replace INDEX(fk_loga) with INDEX(fk_loja, codigo). I would expect a better EXPLAIN.-
I assume that
status has PRIMARY KEY(status). The JOIN to status seems to be useless. Will you get the same answer if you remove it? That will also speed up the query.-
SHOW VARIABLES LIKE "query_cache%"; on each server. There may have been a change there.Context
StackExchange Database Administrators Q#313671, answer score: 2
Revisions (0)
No revisions yet.