Query 1
Query 2
CREATE TABLE `Basic12MFW1D` (
`code` longtext,
`name` longtext,
`ChangeOP` double DEFAULT NULL,
`ChangeNP` double DEFAULT NULL,
`ChangeOPM` double DEFAULT NULL,
`ChangeROE` double DEFAULT NULL,
`ChangeSales` double DEFAULT NULL,
`year` int(11) DEFAULT NULL,
`month` int(11) DEFAULT NULL,
`day` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
This is.
r mysql
It seems certain that there are no indexes in the table at all. So of course it's slow. Because it's a situation similar to finding the sentence you want in a book that doesn't have table of contents ("index").
When people search for books without a table of contents, they search for places that they think are "not here no matter how much." But without that, the database looks for sentences by opening, reading, passing, opening, reading, and passing from page one. That's why it's slow. If you want to pass year
, month
, day
that you don't need, you should specify and organize the table of contents for year
, month
.
Actually, I think you should get help from people who know DB better than me from here. Put a lock on the table, and just enough CREATE INDEX... This is because you need to add an index by using the ON Basic12MFW1D
command. The indexing strategy is... I'm not sure about the DB, so I have to pass it.
579 Understanding How to Configure Google API Key
618 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
585 PHP ssh2_scp_send fails to send files as intended
925 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.