874580011 opened a new issue, #12930: URL: https://github.com/apache/druid/issues/12930
This is the case. At present, the company always uses HTTP to request Druids, but the problem is also very obvious. HTTP makes a query cumbersome. Can we make the Druid request as simple as JDBC. Therefore, I learned that Druid was requested by JDBC, and everything was very smooth by integrating mybatis plus. Just when I wanted to finish work, the problem occurred。By means of jemter pressure measurement,I found that the speed of HTTP query for the same SQL is 10 times faster than that of JDBC. The pressure test configuration is 10 threads,After checking the relevant information, I still can't get the answer, so please help me to see what the situation is HTTP request 1 is jdbc test HTTP request2 is http test <img width="1001" alt="企业微信截图_7e585721-3363-4b2e-9cb5-45afd398de82" src="https://user-images.githubusercontent.com/53367253/185832668-6481b32c-abfa-4a95-9b9c-74eb9a328aba.png"> `@GetMapping("testList1") public String list1() { StopWatch stopWatch = new StopWatch(); stopWatch.start(); List<ApmServiceMetric> appExceptionDataMinList = druidMapper.getApmService(); stopWatch.stop(); System.out.println("stopWatch.getTotalTimeSeconds() = " + stopWatch.getTotalTimeSeconds()); for (ApmServiceMetric apmServiceMetric : appExceptionDataMinList) { System.out.println(apmServiceMetric); } return "success"; }` `@Options(statementType = StatementType.STATEMENT) List<ApmServiceMetric> getApmService();` `<select id="getApmService" resultType="com.tingyun.entity.ApmServiceMetric"> select (CURRENT_TIMESTAMP - INTERVAL '5' MINUTE) as "datetime", TIMESTAMP_TO_MILLIS(CURRENT_TIMESTAMP - INTERVAL '5' MINUTE) as "timestamp", biz_system_id as "bizSystemId", application_id as "applicationId", sum("count") / 5.0 as "APMServiceCPM", sum("count") as "APMServiceCallCount", sum("count") - sum("success_count") as "APMServiceFailCount", (sum("resp_time") * 1.0) / sum("success_count") as "APMServiceAvgResponseTime" from SVR_ACTION_DATA_MIN where "data_type" = 'APP' and "__time" > CURRENT_TIMESTAMP - INTERVAL '10' MINUTE and "__time" <![CDATA[ <= ]]> CURRENT_TIMESTAMP - INTERVAL '5' MINUTE group by biz_system_id, application_id </select>` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
