658,898 questions
2
votes
1
answer
34
views
Parsing MySQL Client Handshake response message
I'm trying to parse the Handshake response packet from MySQL client/server protocol
For the task I'm connecting to the application via mysql cli client:
mysql --version
mysql Ver 9.5.0 for macos15.4 ...
-1
votes
1
answer
70
views
Showing exclusively the biggest value [duplicate]
I've been tasked with finding the client with the highest sum of payments, the table they gave me contains the customer number and amount, I have not been able to do this,
SELECT suma.customerNumber, ...
Best practices
0
votes
7
replies
94
views
MySQL SELECT … FOR UPDATE causing table lock during high traffic while generating sequential transaction IDs
I have a PHP + MySQL project where I need to generate sequential transaction IDs.
Each transaction can have multiple items, so all rows for that transaction must share the same txn_in value.
Tables
...
-2
votes
0
answers
70
views
Как подключить python скрипт к базе данных mysql на phpmyadmin? [closed]
Пароль я использую настоящий, тут я его просто скрыл. Объясните мне пожалуйста, что я сделал не так? Вот сам скрипт:
import pymysql
try:
# Подключение к базе данных
connection = pymysql....
-1
votes
0
answers
33
views
Dapper Mapping not working as expected. Using myql, asp.net core web api [closed]
I am fetching ProductTransfer table together with related products. Although the total records = 1200, am only getting three records returned by my api.
Here is my models
public class ...
2
votes
3
answers
144
views
What is the meaning of that Database is the highest levels in MySQL structure? [closed]
In the book Learning PHP, MySQL, JavaScript, CSS, and HTML5 – A Step-by-Step Guide to Creating Dynamic Websites (6th Edition), it says: “The highest level of MySQL structure is a database.”
What does ...
Best practices
1
vote
3
replies
74
views
Deleting large data without stopping the active mysql server
I'm using a table of approximately 1TB in a MySQL database. This table also has a monthly partition. We store the last two months of data in this table and regularly truncate the data from the ...
1
vote
1
answer
146
views
Make MySQL evaluate subquery first
SELECT tt.trans_type_name AS transaction_type,
trans.transaction_time,
a.trans_action_name AS transaction_action_name,
trans.transaction_notes
FROM(SELECT Cast(...
Advice
0
votes
1
replies
61
views
How to Automate Extraction and Standardization of Multilingual Name/Username Data Without Modifying the Original Database?
We’re working with a user table populated from multiple SSO sources, and the data has inconsistencies that hinder generating standardized names. I need a persistent, automated way to extract and ...
Advice
0
votes
9
replies
141
views
How to make it so a parent NEEDS its children to exist in MySQL?
I am designing a DB where basically parent can't exist without two children. E.g: Entity set Marriage, CAN'T exist without entity set Man and entity set Woman, but neither Man or Woman need Marriage ...
-2
votes
0
answers
27
views
Access denied for user to a database? [migrated]
A user I'm supporting is getting the error. The user has grants to various tables in mydb, but when he tries to access them, he gets the error:
Access denied for user 'myuser'@'myhost' to database '...
0
votes
1
answer
58
views
AWS Glue Script Scanning Entire Table Despite Date Filter
I have written a small Glue script that fetches some data between two dates, but I found that it scans the entire table instead of just the data within the specified time range. I also tried creating ...
Advice
1
vote
5
replies
160
views
Can I make MyDAC update a blob field faster?
So I'm uploading around 50MB into a longblob in a local mysql server.
Using LoadFromStream, setting the param value is near-instantaneous but the execution of the UPDATE statement takes around 2 ...
Best practices
1
vote
6
replies
123
views
Best way to get a number of list elements whose sum of values equal a constant value
I have a list which consists of numeric values.
In Python, it is written as:
[959, 3480, 9346, 8367, 2847, 8330, 6946, 9586, 9722, 2775]
Or in the case of MySQL:
create table testtb(n int);
insert ...
Best practices
0
votes
8
replies
141
views
Should I generally use a LIMIT clause when testing my SQL queries to a database?
I am learning SQL from a class online.
I wanted to ask if it's generally best to use LIMIT in my queries to make them run faster, or at least until I have them tested and pulling the right data.
If ...