MySQL Forums :: Performance :: Query with 2 x subquery


Advanced Search

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
Query with 2 x subquery 723 Jes Ramsing 04/29/2016 06:44AM
Re: Query with 2 x subquery 406 Øystein Grøvlen 04/29/2016 08:01AM
Re: Query with 2 x subquery 382 Jes Ramsing 05/01/2016 11:57PM
Re: Query with 2 x subquery 340 Øystein Grøvlen 05/02/2016 03:45AM
Re: Query with 2 x subquery 351 Jes Ramsing 05/02/2016 05:32AM
Re: Query with 2 x subquery 352 Rick James 05/01/2016 11:58PM
Re: Query with 2 x subquery 394 Jes Ramsing 05/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.