Page 1 of 1

slow access to mariadb

Posted: Wed 23 Aug 2017 12:21
by albourgz
Hi,

I have a mariadb "big" table to process: 20.000.000 records,

CREATE TABLE `eidtmp20172` (
`CARDID` int(11) NOT NULL,
`SOFTREF` varchar(45) NOT NULL,
`ENTRYDATE` datetime NOT NULL,
PRIMARY KEY (`SOFTREF`,`ENTRYDATE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

(there are max 5 entryDate values for each softref, most softref have only one entrydate value.

TUniQuery:
SELECT cardId, softRef, entryDate
FROM EIDtmp20172
ORDER BY softRef,cardId,entryDate;
FetchAll is disabled and unidirectional is true. Fetchrows is 1000, but Open() takes several minutes. Why why why?

Re: slow access to mariadb

Posted: Wed 23 Aug 2017 12:54
by ViktorV
Most likely, the execution of your query on the server takes most of the time, but not the data transfer to the client. Please check the execution time of your query on the server using the standard means, for example, MySQL Workbench.