MySQL Forums
Forum List  »  Performance

Re: Query with 2 x subquery
Posted by: Jes Ramsing
Date: May 01, 2016 11:57PM

Hi Øystein.
I am on MySQL 5.6.27

data_i16:
CREATE TABLE `data_i16` (
`sessionid` bigint(20) NOT NULL,
`varid` int(11) NOT NULL,
`val` smallint(6) NOT NULL,
PRIMARY KEY (`varid`,`sessionid`),
KEY `ui16_idx` (`sessionid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

session:
CREATE TABLE `session` (
`sessionid` bigint(20) NOT NULL AUTO_INCREMENT,
`partid` int(11) NOT NULL,
`readsetid` int(11) NOT NULL,
`tsB` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`tsE` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`sessionid`),
KEY `Index 1` (`sessionid`)
) ENGINE=InnoDB AUTO_INCREMENT=1614938 DEFAULT CHARSET=utf8;

I have a lot of tables like data_i16 - each handling a specicic datatype. The database (solution) handles unstructured datasets captured from some various controllers. Performance is right now now fine except for this bloody query with double sub :-)

I did not know MySQL was operating out of Norway, I was at NTNU for some research two yeasrs ago, nice city but expensive beer.

Options: ReplyQuote


Subject
Views
Written By
Posted
1747
April 29, 2016 06:44AM
921
April 29, 2016 08:01AM
Re: Query with 2 x subquery
888
May 01, 2016 11:57PM
940
May 02, 2016 05:32AM
920
May 01, 2016 11:58PM
973
May 02, 2016 02:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.