skip to Main Content

Index mysql key select

I need help for performance this query SELECT * FROM transactions WHERE created_at BETWEEN '2022-08-25 01:03:21' AND '2022-12-13 01:03:21' AND ((transaction_reason IN ('ORIGINAL','REVERSAL_OF_ADJUSTMENT') AND type = 'DEPOSIT') OR (transaction_reason IN ('ADJUSTMENT','REVERSAL_OF_ORIGINAL') AND type = 'WITHDRAWAL') ) ORDER BY transaction_id ASC…

VIEW QUESTION

MySQL date difference from dates in one column

I have a table "nasypka", with structure: ID|datetime |height|refilled 1 |2022-09-01 12:00|101 |1 2 |2022-09-01 12:01|96 |0 3 |2022-09-01 12:02|50 |0 4 |2022-09-01 12:03|10 |0 ... 50|2022-09-05 17:04|105 |1 51|2022-09-05 17:05|104 |0 ... 80|2022-09-15 10:04|99 |1 81|2022-09-15 10:05|98 |0 This…

VIEW QUESTION

How to optimize MYSQL query?

I want to get latest records of the table with some settings_ids. id settings_id added_date 1 7 2022-08-23 01:44:24 2 9 2022-08-23 01:44:24 3 11 2022-08-23 01:44:24 4 7 2022-08-25 01:44:24 5 9 2022-08-25 01:44:24 6 11 2022-08-25 01:44:24 7…

VIEW QUESTION
Back To Top
Search