Query resource quota for PostgreSQL accounts

Within the latest (12, 13) versions of PostgreSQL, is there any throttling support on the user-account level, to limit how much data any query can produce and/or how much time + memory it may consume under that user account?

I want to limit specific user accounts to allow up to certain amount of data and/or time to consume within the server, before erroring with “query quota exceeded” or something like that.

Example

I want to configure user account guest to produce “quota exceeded” failure for any query that returns more than 10kb of data or takes more than 10 seconds to execute.

clustered index – Cluster is causing my query to run SLOWER then before

So I have been stuck on this for 6 hours now and I have no clue what to do. I am doing university homework that requires us to create a unoptomized sql query (does not have to make sense) and then apply index’s and see if it makes it faster (which it did for me, from 0.70 elapsed time to 0.66) and then we had to apply clusters.

I applied clusters and it has now almost doubled the amount taken to finish the query. From 0.70 to 1.15. Below is how I specified my cluster:

CREATE CLUSTER customer2_custid25 (custid NUMBER(8))  

SIZE 270

TABLESPACE student_ts; 

I tried all my previous times with INITIAL and NEXT but that seemed not to make a difference. Below are the tables:

CREATE TABLE CUSTOMER18 ( 

    CustID         NUMBER(8) NOT NULL,
    FIRST_NAME     VARCHAR2(15),
    SURNAME     VARCHAR2(15),
    ADDRESS     VARCHAR2(20),
    PHONE_NUMBER NUMBER(12)) 

    CLUSTER customer2_custid25(CustID); 

CREATE TABLE product18( 

    ProdID     NUMBER(10) NOT NULL,
    PName    Varchar2(6),
    PDesc    Varchar2(15),
    Price    Number(8),
    QOH        Number(5)); 

CREATE TABLE sales18( 

    SaleID     NUMBER(10) NOT NULL,
    SaleDate    DATE,
    Qty            Number(5),
    SellPrice    Number(10),
    CustID        NUMBER(8),
    ProdID        NUMBER(10)) 

    CLUSTER customer2_custid25(CustID); 
 

CREATE INDEX customer2_custid_clusterindxqg ON CLUSTER customer2_custid25 TABLESPACE student_ts ; 

I also tried taking the tablespace section in the cluster index away.

I followed this formula to help calculate cluster sizes:

“Size of a cluster is the size of a parent row + (size of Child row *
average number of children). “

This brought me to the size of 270. However, after testing sizes (going up 20) from 250 to 350 I found 320 to be the fastest at 1.15.


No matter what I try, I can not for the love of me get it lower then my base query times.

Other students have done the same and halved their query time.

All help is really appreciated.

hooks – SharePoint online search query from Drupal in logged in user context, which is connected through SIMPLESAML SSO (Azure AD IDP) with PHP application

Below is problem description – I have sharepoint online and its URL is like – https://abc.sharepoint.com

Above sharepoint is connected through SSO (Office 365 Azure AD IDP and SAML)

I have another Drupal 8 application like – https://drupalapp.something.com

It is also connected through same SSO (Office Azure AD and SAML) so that if user login through either of application through SSO then he is allowed to login in another application as well. It means application is Single sign on enabled. and its working fine.

Now as a user, i am able to login through drupalapp.something.com using SSO (office 365 azure AD and SAML ). Now after user login being developer, i need to show recent modified SharePoint document from SharePoint online using SharePoint REST query but condition is that, it should fetch only documents on which logged in user has permission to show.

Brief requirement –

The requirements is to be able to make REST queries to SharePoint online but when the REST query is made, the person the query is for must only see the results based on their security context.

So if user1 has access to a SharePoint folder but user2 has not, then when the REST call is made they will each see a different set of results.

Example: user1 has access to abc.sharepoint.com/abcfolder/afile.pdf. User2 does not have access to the folder abc.sharepoint.com/abcfolder/ and so he will not have access to abc.sharepoint.com/abcfolde/afile.pdf.

If some updates this document it becomes a “Latest Update”. User1 will see it in the Latest documents but User2 will not.

I tried using PHPSPO library (https://github.com/vgrem/phpSPO) and it giving me result but this library is giving me result based on admin credential which I pass to connect SharePoint. So this is giving me all the documents regardless of logged in user permission.

How can we achieve this in logged in user context. Considering user is already login through SSO in Drupal application through SSO.

I also tried to make AJAX request with credential query from Drupal app but it always giving me CORS and CORB error. I don’t know if this is right way of solution. Below is code –

var urlval = “https://abc.sharepoint.com/_api/search/query?querytext=’isdocument:1’&selectproperties=’Title,Size,Name,Path,FileExtension’&rowlimit=5&sortlist=’created:descending’&refiners=’fileextension'”;

    $.ajaxSetup({
      xhrFields: {
        withCredentials: true
      }
    });
    
    $.ajax({
      type: 'GET',
      crossDomain: true,
      dataType: 'jsonp',
      url: urlval,
      cache: false,
      headers: {
        "accept": "application/json",
        "Access-Control-Allow-Origin": "https://abc.sharepoint.com",
      },
     
      success: function( response ) {
        console.log( response ); // server response
      }
    });

Please help me to solve this problem.

Thanks

query performance – perform an operation using yesterday’s and today’s value

I have a database where there is an table wm for water meters :

+------+---------------+
| Code |     name      |
+------+---------------+
| wm1  | water meter 1 |
| wm2  | water meter 2 |
| wm3  | water meter 3 |
+------+---------------+

and another table counters where there are counters value :

+------+---------+-------+------------+
| Code | Code_wm | value | created_at |
+------+---------+-------+------------+
|    1 | wm1     |   100 | 2020-10-18 |
|    2 | wm1     |   0   | 2020-10-19 |
|    3 | wm2     |   0   | 2020-10-18 |
|    4 | wm2     |   100 | 2020-10-19 |
|    5 | wm3     |   0   | 2020-10-18 |
|    6 | wm3     |   100 | 2020-10-19 |
+------+---------+-------+------------+

i want get this result :

| code_wm | result |   Date     |
+---------+--------+------------+
| wm1     | 0-100  | 2020-10-19 |
| wm2     | 100-0  | 2020-10-19 |
| wm2     | 100-0  | 2020-10-19 |
+---------+--------+------------+

but when i try :

SELECT code_wm , LAG(value,1,0) OVER ( ORDER BY code_wm) as result
FROM counters 

i don’t get the correct result , the first line is 0 and if i use WHERE created_at i don’t get none

sql – wordpress slow query shown in query monitor

I have a slow query on a wordpress site. I believe it’s my subquery inside it for the ‘abbreviation’. How can I rewrite this to make it faster? I’m not having much luck. The query takes about 0.1219 seconds I have both the query and the explain below, my goal is to modify this query to make it execute faster, thanks.

This is the query:

SELECT
    wrapper_featured_colorways.id,
    wrapper_featured_colorways.design_name AS dname,
    wrapper_featured_colorways.designId,
    wrapper_featured_colorways.submodel_id,
    wrapper_featured_colorways.sled_image,
    wrapper_featured_colorways.sled_png,
    wrapper_featured_colorways.colorway_name,
    wrapper_featured_colorways.engineId,
    wrapper_featured_colorways.yearText,
    wrapper_submodels.model_id,
    wrapper_submodels.sub_name,
    wrapper_models.model_name,
    wrapper_chassis.id AS chassis_id,
    wrapper_chassis.chassis_name,
    wrapper_manufacturers.mf_name,
    wrapper_manufacturers.mf_id,
    a.guid AS svgPath,
    afx_posts.post_type,
    afx_posts.post_title,
    GROUP_CONCAT(
        wrapper_featured_colorway_colors.color_name
    ORDER BY
        wrapper_featured_colorway_colors.sort_order
    ) AS colors
FROM
    wrapper_featured_colorways
JOIN afx_posts a ON
    (
        a.post_parent = wrapper_featured_colorways.designId
    )
JOIN afx_posts ON(
        afx_posts.ID = wrapper_featured_colorways.designId
    )
JOIN afx_postmeta z ON
    (
        (z.meta_key = 'svg_image') AND(a.ID = z.meta_value)
    )
JOIN wrapper_submodels ON wrapper_featured_colorways.submodel_id = wrapper_submodels.id
JOIN wrapper_models ON wrapper_submodels.model_id = wrapper_models.id
JOIN wrapper_chassis ON wrapper_models.chassis_id = wrapper_chassis.id
JOIN wrapper_manufacturers ON wrapper_chassis.manufacturer_id = wrapper_manufacturers.mf_id
JOIN wrapper_featured_colorway_colors ON wrapper_featured_colorways.id = wrapper_featured_colorway_colors.colorway_id
WHERE
    wrapper_featured_colorways.deleted = 0
GROUP BY
    wrapper_featured_colorway_colors.colorway_id

This is the Explain:

EXPLAIN SELECT
    wrapper_featured_colorways.id,
    wrapper_featured_colorways.design_name AS dname,
    wrapper_featured_colorways.designId,
    wrapper_featured_colorways.submodel_id,
    wrapper_featured_colorways.sled_image,
    wrapper_featured_colorways.sled_png,
    wrapper_featured_colorways.colorway_name,
    wrapper_featured_colorways.engineId,
    wrapper_featured_colorways.yearText,
    wrapper_submodels.model_id,
    wrapper_submodels.sub_name,
    wrapper_models.model_name,
    wrapper_chassis.id AS chassis_id,
    wrapper_chassis.chassis_name,
    wrapper_manufacturers.mf_name,
    wrapper_manufacturers.mf_id,
    a.guid AS svgPath,
    afx_posts.post_type,
    afx_posts.post_title,
    GROUP_CONCAT(
        wrapper_featured_colorway_colors.color_name
    ORDER BY
        wrapper_featured_colorway_colors.sort_order
    ) AS colors
FROM
    wrapper_featured_colorways
JOIN afx_posts a ON
    (
        a.post_parent = wrapper_featured_colorway(...)


1   SIMPLE  wrapper_manufacturers   
    NULL
    ALL PRIMARY 
    NULL
    
    NULL
    
    NULL
    4   100.00  Using temporary; Using filesort 
1   SIMPLE  wrapper_featured_colorways  
    NULL
    ALL PRIMARY 
    NULL
    
    NULL
    
    NULL
    45  10.00   Using where; Using join buffer (Block Nested Loop)  
1   SIMPLE  wrapper_submodels   
    NULL
    eq_ref  PRIMARY PRIMARY 4   fxgraphi_v2019.wrapper_featured_colorways.submodel_id   1   100.00  Using where 
1   SIMPLE  wrapper_models  
    NULL
    eq_ref  PRIMARY PRIMARY 4   fxgraphi_v2019.wrapper_submodels.model_id   1   100.00  Using where 
1   SIMPLE  wrapper_chassis 
    NULL
    eq_ref  PRIMARY PRIMARY 4   fxgraphi_v2019.wrapper_models.chassis_id    1   10.00   Using where 
1   SIMPLE  afx_posts   
    NULL
    eq_ref  PRIMARY PRIMARY 8   fxgraphi_v2019.wrapper_featured_colorways.designId  1   100.00  Using index condition   
1   SIMPLE  z   
    NULL
    ref meta_key    meta_key    576 const   139 100.00  Using where 
1   SIMPLE  a   
    NULL
    eq_ref  PRIMARY,post_parent PRIMARY 8   fxgraphi_v2019.z.meta_value 1   10.00   Using index condition; Using where  
1   SIMPLE  wrapper_featured_colorway_colors    
    NULL
    ALL 
    NULL
    
    NULL
    
    NULL
    
    NULL
    1431    10.00   Using where; Using join buffer (Block Nested Loop)  

```

wp query – SQL to join u3g_users & u3g_meta_value with repeating data

I’m using the below SQL to create a table from wordpress user information joining data in u3g_users and u3g_metavalue.

SELECT u3g_users.`ID`,
       u3g_users.`display_name` AS `Name`,
       u3g_users.`user_email` AS `Email`,
       u3g_users.`user_login` AS `Login (Email)`,
       u3g_usermeta.`meta_value` AS `Address #1`
       
FROM u3g_users

INNER JOIN u3g_usermeta
     ON u3g_users.`ID` = u3g_usermeta.`user_id`
     
WHERE meta_key = '#address1'

The code as it is shows 2 users out of 183 that have actual values for the meta_key set as #address1

I’m trying to expand the code to show the following but can’t seem to get there.

  1. The current code shows me the results of just two user where the meta_value has a value. I need it to show ALL Users even if the meta_value is blank.

  2. The meta_key also contains additional sections for which I need to expand on for example #address #2 I’ve tried to make a repetition to show a sixth column which should be ‘#Address2’ for example the column headings would be Name, Email, Login(Email), Address #1, Address #2

The goal is to create an SQL code that combines u3g_users & u3g_meta_value with repeating columns of meta_value so that the user can see a better defined user database on the front end even is the data is blank

Any pointers would be great

Thanks in Advanced

wp query – Sort wordpress custom posts based on meta value

I’m trying to sort the custom posts based on meta value as priority level1, level2 and level3. I have given a dropdown field in post meta as featured posts, standard posts and basic posts. I want to display them as featured posts on top, then standard posts and then basic posts. I tried with below code but it’s not sorting the posts in the order.

Any guidance or advise much appreciated!

Here is my code:

Array(
    'name'          => __( 'Listing Type Options', 'text-domain' ),
    'id'            => 'lising_type_options',
    'type'          => 'select',
    'child_of' => '',
    'options' => array(
        '' => 'Select Listing Type',
        '1' => 'Basic',
        '2' => 'Standard',
        '3' => 'Featured',
    ),
    'desc' => ''
),

if( isset( $lp_type ) && !empty( $lp_type ) ){
     if( $lp_type == '3' ){
          $lp_type = 'Featured';
     } elseif( $lp_type == '2' ){
          $lp_type = 'Standard';
     } elseif( $lp_type == '1' ){
          $lp_type = 'Basic';
     }
} else{
     $lp_type = '';
}

This is the query:

            $args = array(
                    'post_type' => $type,
                    'post_status' => 'publish',
                    'posts_per_page' => $postsonpage,
                    'paged'  => $paged,
                    'post__not_in' =>$ad_campaignsIDS,
                    'tax_query' => $TxQuery,
                    // 'meta_key'   => $MtKey,
                    // 'orderby' => $lporderby,
                    // 'order'   => $lporders,
                    'order'      => 'DESC',
                    'orderby'    => 'meta_value',
                    'meta_query' => array(
                        'relation' => 'OR',
                                $MtKey,
                                array(
                                    'relation' => 'OR',
                                    array( 
                                        'key'     => 'lp_listingpro_options',
                                        'value'   => 'lising_type_options',
                                        'compare' => 'LIKE',
                                    ),
                                    array(
                                        'key'     => 'lp_listingpro_options',
                                        'value'   => 'lising_type_options',
                                        'compare' => 'NOT LIKE',
                                    ),
                                ),
                        ),
                );

bug – A REST query for a specific item using list/items(itemID) returns a single result that has data from adjacent list items. How is this possible?

This is perhaps one of the most bizarre problems/bugs I’ve ever seen with SharePoint. And, to be clear, I am only seeing it with one user (so far!), specifically using Edge (v.85.0.564.44). If I have the same user use their Chrome or Firefox browser, everything works as expected. I also have the same version of Edge on my laptop, and when I try using Edge on the same page to execute the same code, everything works as expected. So it definitely seems to be a very isolated issue, and I realize that because of that this is getting very close to being off-topic here.

But at the same time, the issue is that what seems to be a very straighforward REST query is showing bizarre results returned from the server, so it leads me to believe that something is going on with the request somehow that is causing the server to respond the way it does, so in that respect this is a question about the correct way to interact with the SharePoint REST API, and therefore on-topic.

Anyway, what is happening is… well, let me set up a very contrived, simple scenario to make it easy to illustrate what I’m seeing.

Imagine a list set up like so, which includes a multi-select lookup field:

ID    Title              AMultiLookup
--    ----------------   ------------
 1    I am Number One!   (1, 2, 3)
 2    It should be me    (4, 5, 6)
 3    The third one      (7, 8, 9)

(I’ve used the lookup IDs set in the lookup field to make it easier to see what’s happening.)

Now imagine that I send a simple REST request for item with ID 2, using the endpoint

/_api/web/lists/getbytitle('My List')/items(2)

with no additional oData query parameters – no $select, no $filter, nothing – just straight up “give me item number 2”.

Given the list data above, I would expect a result of

d: {
    AMultiLookup: {
        results: (4, 5, 6),
    },
    ID: 2,
    Id: 2,
    Title: "It should be me"
}

However, what actually gets returned is

d: {
    AMultiLookup: {
        results: (7, 8, 9),
    },
    ID: 2,
    Id: 2,
    Title: "I am Number One!"
}

Notice that although the ID in the response is the ID of the item I asked for (2), the value of the Title field is from item ID: 1 and the value of the AMultiLookup field is from item ID: 3.

What the what??? How is that possible?

I first saw this issue in another query on another page where I was applying some $select values to limit the response (so ID was not included), and I thought perhaps it was an “off by one” issue where somehow the browser was incrementing (or decrementing) the ID of the item I was querying for before the request got sent out, so therefore the server was returning the correct result, it was just my query that was messed up. But in all cases, I construct the URL like

var uri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('List Name')/items(" + desiredItemID + ")";
$.ajax({
    url: uri,
    // etc
});

and I set breakpoints after the uri string was constructed, but before the request went out, and saw that the string did include the correct item ID being requested. The fact that the ID of the requested item was not being changed was borne out by the results of the request that did not add any $select parameters and returned the ID of the item in the result, which matched what was being requested.

Also, I don’t think it’s an “off by one” browser mutation kind of error being applied to the results after they’re received, because

  • How could the browser change the string of the Title property to exactly what the Title is of a different list item?
  • The lookup IDs in the multi-lookup array were not “off by one”. It the expected result was (4,5,6) the actual result was not (5,6,7), it was (7,8,9). And in any case, in the actual data, the expected result was not in numerical order (i.e. the true expected result was (4,6,5)), while the actual result was in numerical order, which perfectly matched the value of the field in the other list item.

So I think there is compelling evidence here that a request for a single list item (by ID) is returning data from adjacent list items on both sides of the requested item.

So…. how does that happen?

I’m using jQuery 3.4.1 to make the requests, and I’m not doing anything fancy with the requests, they’re super basic, like

$.ajax({
    url: uri,
    method: 'GET',
    headers: {
        accept: 'application/json;odata=verbose'
    }
});

Could Edge be adding some extra header that confuses the server and causes that behavior? If so, it’s not inherent in Edge v.85.0.564.44, since I also have that version and it behaves fine for me.

Any ideas here would be appreciated.

Why MyBatis query big table timeout but fast in Sequel Pro in MySQL 5.7

I am using MySQL 5.7, today this is a long time query stuck me. this is my table DML:

CREATE TABLE `h_round_pump_record` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '',
  `tenant_id` bigint(20) NOT NULL COMMENT '',
  `tenant_name` varchar(256) NOT NULL DEFAULT '' COMMENT '',
  `created_time` bigint(20) NOT NULL COMMENT '',
  `updated_time` bigint(20) NOT NULL COMMENT '',
  `app_id` bigint(11) NOT NULL COMMENT '',
  `app_mark` varchar(256) NOT NULL DEFAULT '' COMMENT '',
  `app_name` varchar(256) NOT NULL DEFAULT '' COMMENT '',
  `settlement_time` bigint(20) NOT NULL COMMENT '',
  `biz_id` bigint(20) NOT NULL COMMENT '',
  `room_play_id` bigint(20) NOT NULL COMMENT '',
  `room_amount_fmt` varchar(256) NOT NULL DEFAULT '' COMMENT '',
  `tenant_revenue` bigint(20) GENERATED ALWAYS AS ((`real_people_revenue` + `robot_profit`)) STORED,
  PRIMARY KEY (`id`),
  UNIQUE KEY `biz_id` (`biz_id`,`tenant_id`,`app_id`),
  KEY `round_record_idx` (`settlement_time`,`having_real_people`,`tenant_id`,`app_id`)
) ENGINE=InnoDB AUTO_INCREMENT=907725 DEFAULT CHARSET=utf8mb4;

and this is my query sql:

select *
    from h_round_pump_record 
     WHERE (  settlement_time <= 1601481599000
                  and settlement_time >= 1598889600000
                  and tenant_id = 
                  and app_id in
                  (
                    1
        ) )

to speed up query, I create a index in settlement_time. In Sequel Pro the SQL will return result in 3 seconds, but In apps query using MyBatis, it will take 30s to return, why the MyBatis query takes so long(the sql is the same because I am copied from slow_log table)? This is my slow log settings:

set global slow_query_log=ON
set global log_output='table';
set long_query_time = 5;
select * 
from mysql.slow_log;

this is the log output of MyBatis:

org.springframework.dao.QueryTimeoutException: 
### Error querying database.  Cause: com.mysql.cj.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
### The error may exist in class path resource (mybatis/mapper/illidan/RoundPumpRecordMapper.xml)
### The error may involve com.sportswin.soa.illidan.hub.dao.RoundPumpRecordMapper.selectByExample-Inline
### The error occurred while setting parameters
### SQL: select           'true' as QUERYID,                id, tenant_id, tenant_name, agent_id, agent_name, created_time, updated_time, app_id,      app_mark, app_name, settlement_time, biz_id, room_play_id, room_amount_fmt, ratio,      tenant_revenue, real_pump_amount, real_people_profit, robot_profit, robot_revenue,      real_people_revenue, having_real_people         from h_round_pump_record                         WHERE (  settlement_time <= ?                                                                and settlement_time >= ?                                                                and tenant_id = ?                                                                and app_id in                   (                     ?                   ) )
### Cause: com.mysql.cj.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
; Statement cancelled due to timeout or client request; nested exception is com.mysql.cj.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
    at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:76) ~(spring-jdbc-5.1.13.RELEASE.jar!/:5.1.13.RELEASE)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) ~(spring-jdbc-5.1.13.RELEASE.jar!/:5.1.13.RELEASE)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~(spring-jdbc-5.1.13.RELEASE.jar!/:5.1.13.RELEASE)
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74) ~(mybatis-spring-2.0.2.jar!/:2.0.2)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) ~(mybatis-spring-2.0.2.jar!/:2.0.2)
    at com.sun.proxy.$Proxy178.selectList(Unknown Source) ~(na:na)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223) ~(mybatis-spring-2.0.2.jar!/:2.0.2)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147) ~(mybatis-3.5.2.jar!/:3.5.2)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80) ~(mybatis-3.5.2.jar!/:3.5.2)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:57) ~(mybatis-3.5.2.jar!/:3.5.2)
    at com.sun.proxy.$Proxy187.selectByExample(Unknown Source) ~(na:na)
    at com.sportswin.soa.illidan.hub.service.impl.HubRoundPumpRecordService.lambda$page$0(HubRoundPumpRecordService.java:63) ~(classes!/:na)
    at com.github.pagehelper.Page.doSelectPageInfo(Page.java:353) ~(pagehelper-5.1.11.jar!/:na)
    at com.sportswin.soa.illidan.hub.service.impl.HubRoundPumpRecordService.page(HubRoundPumpRecordService.java:62) ~(classes!/:na)
    at com.sportswin.soa.illidan.hub.common.HubCommonUtil.getRoundPump(HubCommonUtil.java:164) ~(classes!/:na)
    at com.sportswin.soa.illidan.hub.common.HubScheduleTask.generateImpl(HubScheduleTask.java:177) ~(classes!/:na)
    at com.sportswin.soa.illidan.hub.common.HubScheduleTask.generateFilesTask(HubScheduleTask.java:159) ~(classes!/:na)
    at com.sportswin.soa.illidan.hub.common.HubScheduleTask.lambda$generateExportFile$0(HubScheduleTask.java:103) ~(classes!/:na)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~(na:1.8.0_212)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~(na:1.8.0_212)
    at com.sportswin.soa.misc.config.async.pool.MdcTaskDecorator.lambda$decorate$0(MdcTaskDecorator.java:31) ~(soa-misc-1.0.0-SNAPSHOT.jar!/:na)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~(na:1.8.0_212)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~(na:1.8.0_212)
    at java.lang.Thread.run(Thread.java:748) ~(na:1.8.0_212)
Caused by: com.mysql.cj.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:113) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.mysql.cj.jdbc.StatementImpl.checkCancelTimeout(StatementImpl.java:2191) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1020) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.mysql.cj.NativeSession.execSQL(NativeSession.java:1075) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:930) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.mysql.cj.jdbc.ClientPreparedStatement.execute$original$zlbDqAbk(ClientPreparedStatement.java:370) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.mysql.cj.jdbc.ClientPreparedStatement.execute$original$zlbDqAbk$accessor$77RRWgJE(ClientPreparedStatement.java) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.mysql.cj.jdbc.ClientPreparedStatement$auxiliary$WZ5P0ECx.call(Unknown Source) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:93) ~(skywalking-agent.jar:6.5.0)
    at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java) ~(mysql-connector-java-8.0.19.jar!/:8.0.19)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3051) ~(druid-1.1.9.jar!/:1.1.9)
    at com.alibaba.druid.filter.FilterAdapter.preparedStatement_execute(FilterAdapter.java:1080) ~(druid-1.1.9.jar!/:1.1.9)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3049) ~(druid-1.1.9.jar!/:1.1.9)
    at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440) ~(druid-1.1.9.jar!/:1.1.9)
    at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3049) ~(druid-1.1.9.jar!/:1.1.9)
    at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167) ~(druid-1.1.9.jar!/:1.1.9)
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498) ~(druid-1.1.9.jar!/:1.1.9)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) ~(mybatis-3.5.2.jar!/:3.5.2)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~(mybatis-3.5.2.jar!/:3.5.2)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) ~(mybatis-3.5.2.jar!/:3.5.2)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324) ~(mybatis-3.5.2.jar!/:3.5.2)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~(mybatis-3.5.2.jar!/:3.5.2)
    at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source) ~(na:na)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~(na:1.8.0_212)
    at java.lang.reflect.Method.invoke(Method.java:498) ~(na:1.8.0_212)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~(mybatis-3.5.2.jar!/:3.5.2)
    at com.sun.proxy.$Proxy254.query(Unknown Source) ~(na:na)
    at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source) ~(na:na)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~(na:1.8.0_212)
    at java.lang.reflect.Method.invoke(Method.java:498) ~(na:1.8.0_212)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63) ~(mybatis-3.5.2.jar!/:3.5.2)
    at com.sun.proxy.$Proxy254.query(Unknown Source) ~(na:na)
    at com.github.pagehelper.util.ExecutorUtil.pageQuery(ExecutorUtil.java:180) ~(pagehelper-5.1.11.jar!/:na)
    at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:104) ~(pagehelper-5.1.11.jar!/:na)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~(mybatis-3.5.2.jar!/:3.5.2)
    at com.sun.proxy.$Proxy254.query(Unknown Source) ~(na:na)
    at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source) ~(na:na)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~(na:1.8.0_212)
    at java.lang.reflect.Method.invoke(Method.java:498) ~(na:1.8.0_212)
    at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49) ~(mybatis-3.5.2.jar!/:3.5.2)
    at tk.mybatis.orderbyhelper.OrderByHelper.intercept(OrderByHelper.java:115) ~(orderby-helper-0.0.2.jar!/:na)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~(mybatis-3.5.2.jar!/:3.5.2)
    at com.sun.proxy.$Proxy254.query(Unknown Source) ~(na:na)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147) ~(mybatis-3.5.2.jar!/:3.5.2)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~(mybatis-3.5.2.jar!/:3.5.2)
    at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source) ~(na:na)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~(na:1.8.0_212)
    at java.lang.reflect.Method.invoke(Method.java:498) ~(na:1.8.0_212)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ~(mybatis-spring-2.0.2.jar!/:2.0.2)
    ... 19 common frames omitted