# What is Profile\_query\_end?

**URL:** <https://forums.percona.com/t/what-is-profile-query-end/1712>\
**Category:** Other MySQL® Questions\
**Created:** [November 21, 2011, 1:02am UTC](https://forums.percona.com/t/what-is-profile-query-end/1712 "2011-11-21T01:02:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenisM](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@DenisM](https://forums.percona.com/u/DenisM)\
**Post date:** [November 21, 2011, 1:02am UTC](https://forums.percona.com/t/what-is-profile-query-end/1712/1 "2011-11-21T01:02:24Z")

</div>

Hi!  
Insert into InnoDB table are too slow. Below is an excerpt from slow\_log:

# Query\_time: 0.635458 Lock\_time: 0.000028 Rows\_sent: 0 Rows\_examined: 0 Rows\_affected: 1 Rows\_read: 0# Bytes\_sent: 19 Tmp\_tables: 0 Tmp\_disk\_tables: 0 Tmp\_table\_sizes: 0# Profile\_starting: 0.000018 Profile\_starting\_cpu: 0.000018 Profile\_checking\_permissions: 0.000003 Profile\_checking\_permissions\_cpu: 0.000002 Profile\_Opening\_tables: 0.000006 Profile\_Opening\_tables\_cpu: 0.000006 Profile\_System\_lock: 0.000002 Profile\_System\_lock\_cpu: 0.000002 Profile\_init: 0.000006 Profile\_init\_cpu: 0.000006 Profile\_update: 0.000025 Profile\_update\_cpu: 0.000025 Profile\_Waiting\_for\_query\_cache\_lock: 0.000001 Profile\_Waiting\_for\_query\_cache\_lock\_cpu: 0.000001 Profile\_update: 0.000004 Profile\_update\_cpu: 0.000004 Profile\_end: 0.000001 Profile\_end\_cpu: 0.000001 Profile\_query\_end: 0.635375 Profile\_query\_end\_cpu: 0.000263 Profile\_closing\_tables: 0.000007 Profile\_closing\_tables\_cpu: 0.000007 Profile\_freeing\_items: 0.000012 Profile\_freeing\_items\_cpu: 0.000011 Profile\_logging\_slow\_query: 0.000001 Profile\_logging\_slow\_query\_cpu: 0.000001# Profile\_total: 0.635460 Profile\_total\_cpu: 0.000347# InnoDB\_trx\_id: C3FEF74# QC\_Hit: No Full\_scan: No Full\_join: No Tmp\_table: No Tmp\_table\_on\_disk: No# Filesort: No Filesort\_on\_disk: No Merge\_passes: 0# InnoDB\_IO\_r\_ops: 0 InnoDB\_IO\_r\_bytes: 0 InnoDB\_IO\_r\_wait: 0.000000# InnoDB\_rec\_lock\_wait: 0.000000 InnoDB\_queue\_wait: 0.000000# InnoDB\_pages\_distinct: 4INSERT INTO `logs` (userid, date, ip, ip1, host, domain, address, referer, browser) VALUES (‘32f1d43dcc84ff1d5a2f1da2d7b1e35d’, 1321853873, INET\_ATON(‘1.2.3.4’), ‘’, ‘’, ‘[www.company.com](http://www.company.com)’, ‘/lib/action.php’, ‘[http://www.company.com/cart](http://www.company.com/cart)’, ‘Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0’);

Table structure is as follows:

CREATE TABLE logs( id INT(11) NOT NULL AUTO\_INCREMENT, userid CHAR(32) NOT NULL, `date` INT(11) NOT NULL, ip BIGINT(20) NOT NULL DEFAULT 0, ip1 CHAR(255) NOT NULL, host CHAR(255) NOT NULL, domain CHAR(50) NOT NULL, address VARCHAR(1023) NOT NULL, referer VARCHAR(1023) NOT NULL, browser VARCHAR(511) NOT NULL, PRIMARY KEY (id), INDEX `date` (`date`))ENGINE = INNODBAVG\_ROW\_LENGTH = 904CHARACTER SET utf8COLLATE utf8\_unicode\_ci

Maybe, long VARCHARs do matter?

---

<div class="post-metadata">

**Author:** ![DenisM](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@DenisM](https://forums.percona.com/u/DenisM)\
**Post date:** [November 21, 2011, 1:52am UTC](https://forums.percona.com/t/what-is-profile-query-end/1712/2 "2011-11-21T01:52:37Z")

</div>

By the way,  
CPU: 2x X5687 3.6 GHz  
RAM: 96 GB  
HDD: RAID10 with BBWC  
OS: CentOS 6  
Percona Server 5.5.16  
my.cnf:

skip-external-lockingskip-name-resolveft\_min\_word\_len = 4back\_log = 100max\_connections = 200max\_user\_connections = 200interactive\_timeout = 120wait\_timeout = 120connect\_timeout = 5key\_buffer\_size = 6Gmyisam\_sort\_buffer\_size = 4095Mjoin\_buffer\_size = 1Msort\_buffer\_size = 2Mtable\_cache = 2048thread\_cache\_size = 286thread\_stack = 196Kmax\_allowed\_packet = 16Mmax\_connect\_errors = 10max\_heap\_table\_size = 1Gtmp\_table\_size = 64Minnodb\_data\_file\_path = ibdata1:10M:autoextendinnodb\_file\_per\_tableinnodb\_buffer\_pool\_size = 40Ginnodb\_additional\_mem\_pool\_size = 20Minnodb\_log\_file\_size = 1900Minnodb\_log\_buffer\_size = 16Minnodb\_flush\_log\_at\_trx\_commit = 1innodb\_flush\_method = O\_DIRECTinnodb\_lock\_wait\_timeout = 50innodb\_thread\_concurrency = 32transaction\_isolation = REPEATABLE-READ# Profiling queriesslow-query-log = 0long\_query\_time = 0.5log\_slow\_rate\_limit = 1log\_slow\_verbosity = full,profilingquery\_response\_time\_stats = ON# Replicationserver-id = 103binlog-format = MIXEDlog-bin = mysql-binlog-bin-index = mysql-bin.indexrelay-log = relay-logrelay-log-index = relay-log.indexexpire\_logs\_days = 10log-slave-updates = 1sync\_binlog = 1binlog\_cache\_size = 1M

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [November 21, 2011, 10:08am UTC](https://forums.percona.com/t/what-is-profile-query-end/1712/3 "2011-11-21T10:08:59Z")

</div>

Can you reproduce this by inserting into the table yourself, and using SHOW PROFILES? Or is this query only slow sometimes?
