title: Why these c3p0 queries are running often in mysql
body: <p>below is the <code>c3p0</code> and <code>hibernate</code> configuration and i'm going through below issues.why are these queries are running continuously and how can I disable them.</p>
  
  <p><strong>Hibernate and c3p0 configuration</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  "hibernate-configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;
              com.mysql.cj.jdbc.Driver
          &lt;/property&gt;
          &lt;property name="hibernate.connection.url"&gt;
              jdbc:mysql://localhost/?autoReconnect=true
          &lt;/property&gt;
          &lt;property name="current_session_context_class"&gt;thread&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;root&lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;dpSJtjixUinCDoV4ia6yCQ==&lt;/property&gt;
          &lt;property name="hibernate.dialect"&gt;
              com.razorthink.runtime.RztMysqlDialect
          &lt;/property&gt;
          &lt;property name="hibernate.connection.provider_class" &gt;com.virima.connectionPool.CustomConnectionProvider&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_size"&gt;400&lt;/property&gt;
          &lt;property name="hibernate.c3p0.min_size"&gt;4&lt;/property&gt;
          &lt;property name="hibernate.c3p0.acquire_increment"&gt;1&lt;/property&gt;
          &lt;property name="hibernate.c3p0.idle_test_period"&gt;300&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_statements"&gt;0&lt;/property&gt;
          &lt;property name="hibernate.c3p0.timeout"&gt;300&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_idle_time"&gt;2000&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_connection_age"&gt;6000&lt;/property&gt;
          &lt;property name="show_sql"&gt;false&lt;/property&gt;
          &lt;property name="hibernate.connection.isolation"&gt;2&lt;/property&gt;
          &lt;property name="hibernate.connection.CharSet"&gt;utf8&lt;/property&gt;
          &lt;property name="hibernate.connection.characterEncoding"&gt;utf8&lt;/property&gt;
      &lt;mapping resource="h915211324.hbm.xml" /&gt;
  
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p><strong>Queries causing cpu hit are below</strong></p>
  
  <pre><code>2020-04-29T15:22:47.740540Z  5200 Query SHOW FULL TABLES FROM `emdb_1521702330190` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.740831Z  5187 Query SHOW FULL TABLES FROM `emdb_1521702330190` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.750197Z  5200 Query SHOW FULL TABLES FROM `emdb_1557220119370` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.750521Z  5187 Query SHOW FULL TABLES FROM `emdb_1557220119370` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.770292Z  5213 Query SHOW FULL TABLES FROM `emdb_1584082233309` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.775548Z  5279 Query SHOW FULL TABLES FROM `emdb_1563780179958` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.776983Z  5201 Query SHOW FULL TABLES FROM `emdb_1563780179958` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.778582Z  5234 Query SHOW FULL TABLES FROM `emdb_1584082233309` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.790130Z  5179 Query UPDATE `ta_cmdb_ci_relationships` SET target_ipaddress = '172.24.110.36',target_tags = '|8|',target_icon = null,target_location = '35 Adams Avenue',target_hostname = 'NOC-TRI-UAT-07',target_blueprint = 'Windows Server',target_ci_id=107611,target_host_ci_record_id='26e58509-a7c9-4fef-b5cf-d659a30b103e' WHERE target_id = 107611
  2020-04-29T15:22:47.812510Z  5200 Query SHOW FULL TABLES FROM `emdb_1563774517358` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.812915Z  5187 Query SHOW FULL TABLES FROM `emdb_1563774517358` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.818616Z  5179 Query commit
  2020-04-29T15:22:47.839903Z  5213 Query SHOW FULL TABLES FROM `information_schema` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.840200Z  5213 Query SHOW FULL TABLES FROM `management_db` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.844614Z  5213 Query SHOW FULL TABLES FROM `mysql` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.845308Z  5201 Query SHOW FULL TABLES FROM `emdb_1569887214264` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.845527Z  5279 Query SHOW FULL TABLES FROM `emdb_1569887214264` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.846760Z  5234 Query SHOW FULL TABLES FROM `information_schema` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.846970Z  5234 Query SHOW FULL TABLES FROM `management_db` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.847032Z  5213 Query SHOW FULL TABLES FROM `performance_schema` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.850979Z  5234 Query SHOW FULL TABLES FROM `mysql` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.855794Z  5213 Query SHOW FULL TABLES FROM `quartz_scheduler` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.856963Z  5234 Query SHOW FULL TABLES FROM `performance_schema` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.857565Z  5213 Query SHOW FULL TABLES FROM `sys` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.864297Z  5234 Query SHOW FULL TABLES FROM `quartz_scheduler` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.867085Z  5234 Query SHOW FULL TABLES FROM `sys` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.869482Z  5213 Query select * from ar_data
  2020-04-29T15:22:47.875941Z  5187 Query SHOW FULL TABLES FROM `emdb_1563780179958` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.876417Z  5200 Query SHOW FULL TABLES FROM `emdb_1563780179958` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.877967Z  5253 Query SHOW DATABASES
  2020-04-29T15:22:47.879442Z  5234 Query SHOW DATABASES
  2020-04-29T15:22:47.880157Z  5253 Query SHOW FULL TABLES FROM `async_data` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.882533Z  5234 Query SHOW FULL TABLES FROM `async_data` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.901594Z  5279 Query SHOW FULL TABLES FROM `emdb_1584082233309` LIKE 'PROBABLYNOT'
  2020-04-29T15:22:47.912542Z  5201 Query SHOW FULL TABLES FROM `emdb_1584082233309` LIKE 'PROBABLYNOT'
  </code></pre>