Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8544829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:39:13+00:00 2026-06-11T12:39:13+00:00

MySQL profiler cuts queries more that 300 characters length when i get the list

  • 0

MySQL profiler cuts queries more that 300 characters length when i get the list of queries by

 SHOW PROFILES

And i see queries like this:

 SELECT media_videos.`id` AS `media_videos.id`, media_videos.`user_id` AS `media_videos.user_id`, media_videos.`description` AS `media_videos.description`, media_videos.`likes` AS `media_videos.likes`, media_videos.`video` AS `media_videos.video`, media_videos.`resource` AS `media_videos.resource`, 

(It’s an automatically generated query so it can be really long)

So it shows ALL queries but big ones are cut to 300 chars and i can’t see them to the end.

How can i fix that using MySQL tools only (not to profile queries in my app manually)? May be some directives in my.cnf ??

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:39:15+00:00Added an answer on June 11, 2026 at 12:39 pm

    Maybe not the answer you wanted, but the answer nonetheless:

    SHOW PROFILE is implemented in sql/sql_profile.cc

    Code fragments below:

    #define MAX_QUERY_LENGTH 300U
    

    used in

    void QUERY_PROFILE::set_query_source(char *query_source_arg,
                                         uint query_length_arg)
    {
      /* Truncate to avoid DoS attacks. */
      uint length= min(MAX_QUERY_LENGTH, query_length_arg);
      ...
    

    So, short of recompiling the server with a bigger value, SHOW PROFILE will truncate the query to 300 characters, no matter what.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use mysql query profiler in the php script. So that
order by in query is taking to much time in MySQL. SHOW PROFILES shows
Is there any free tool for profiler of MYSQL database? I want to capture
using php and mysql I have two tables, a users table and a profiles
Using the new MySQL Query Profiler in PHPMyAdmin version 2.11.5, I got following results
I have a table in MySQL that have a few columns that have default
Is it possible to use Mini-Profiler with Simple.Data Library? I use it to get
I want a simple way to see what commands are being sent to MySQL.
I have a query that looks like this: select id , int1 , int2
I have a scalar-valued function called DATEONLY that returns DATEADD(DD,0, DATEDIFF(DD,0, @DATETIME)), just like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.