Invalidating query cache entries mysql speed dating at paragon rockford il

Posted by / 09-Jun-2017 10:04

Invalidating query cache entries mysql

Anyway, the replication stream has to clear the cache for a table whenever it encounters a change to that table.And the replication stream is not controlled by your SESSION.

By using grep on the source code, I have been able to collect a list of the server functions which invoke get_thd_proc_info().sql/item_func.cc:3393: thd_proc_info(thd, “User lock”); sql/item_func.cc:3418: thd_proc_info(thd, 0); sql/item_func.cc:3509: thd_proc_info(thd, “User lock”); sql/item_func.cc:3552: thd_proc_info(thd, 0); sql/item_func.cc:3737: thd_proc_info(thd, “User sleep”); sql/item_func.cc:3749: thd_proc_info(thd, 0); sql/log_event.cc:5926: thd_proc_info(thd, proc_info); sql/log_event.cc:5979: thd_proc_info(thd, 0); sql/log_event.cc:6101: thd_proc_info(thd, proc_info); sql/log_event.cc:6135: thd_proc_info(thd, 0); sql/sql_delete.cc:62: thd_proc_info(thd, “init”); sql/sql_delete.cc:253: thd_proc_info(thd, “updating”); sql/sql_delete.cc:336: thd_proc_info(thd, “end”); sql/sql_delete.cc:582: thd_proc_info(thd, “deleting from main table”); sql/sql_delete.cc:897: thd_proc_info(thd, “deleting from reference tables”); sql/sql_delete.cc:906: thd_proc_info(thd, “end”); sql/sql_class.cc:264:const char *set_thd_proc_info(THD *thd, const char *info, sql/sp_head.cc:2734: thd_proc_info(thd, “closing tables”); sql/sp_head.cc:2737: thd_proc_info(thd, 0); sql/lock.cc:258: thd_proc_info(thd, “System lock”); sql/lock.cc:269: thd_proc_info(thd, “Table lock”); sql/lock.cc:317: thd_proc_info(thd, 0); sql/lock.cc:332: thd_proc_info(thd, 0); sql/sql_base.cc:940: thd_proc_info(thd, “Flushing tables”); sql/sql_base.cc:1008: thd_proc_info(thd, 0); sql/sql_base.cc:2140: thd_proc_info(thd, “Waiting for table”); sql/sql_base.cc:2160: thd_proc_info(thd, proc_info); sql/sql_base.cc:3532: thd_proc_info(thd, “Waiting for tables”); sql/sql_base.cc:3548: thd_proc_info(thd, “Reopen tables”); sql/sql_base.cc:3553: thd_proc_info(thd, 0); sql/sql_base.cc:4450: thd_proc_info(thd, “Opening tables”); sql/sql_base.cc:4729: thd_proc_info(thd, 0); sql/sql_base.cc:4878: thd_proc_info(thd, “Opening table”); sql/sql_base.cc:4918: thd_proc_info(thd, 0); sql/sql_base.cc:8511: thd_proc_info(thd, “FULLTEXT initialization”); sql/sql_view.cc:669: thd_proc_info(thd, “end”); sql/sql_update.cc:235: thd_proc_info(thd, “init”); sql/sql_update.cc:464: thd_proc_info(thd, “Searching rows for update”); sql/sql_update.cc:533: thd_proc_info(thd, “Updating”); sql/sql_update.cc:766: thd_proc_info(thd, “end”); sql/sql_update.cc:1260: thd_proc_info(thd, “updating main table”); sql/sql_update.cc:1974: thd_proc_info(thd, “updating reference tables”); sql/sql_update.cc:1986: thd_proc_info(thd, “end”); sql/sql_insert.cc:618: thd_proc_info(thd, “init”); sql/sql_insert.cc:703: thd_proc_info(thd, “update”); sql/sql_insert.cc:923: thd_proc_info(thd, “end”); sql/sql_insert.cc:1796: thd_proc_info(thd, “waiting for delay_list”); sql/sql_insert.cc:1878: thd_proc_info(thd, “Creating delayed handler”); sql/sql_insert.cc:1924: thd_proc_info(thd, “waiting for handler open”); sql/sql_insert.cc:1930: thd_proc_info(thd, “got old table”); sql/sql_insert.cc:2007: thd_proc_info(client_thd, “waiting for handler lock”); sql/sql_insert.cc:2013: thd_proc_info(client_thd, “got handler lock”); sql/sql_insert.cc:2031: thd_proc_info(client_thd, “allocating local table”); sql/sql_insert.cc:2116: thd_proc_info(thd, “waiting for handler insert”); sql/sql_insert.cc:2120: thd_proc_info(thd, “storing row into queue”); sql/sql_insert.cc:2366: thd_proc_info(&(di-thd), 0); sql/sql_insert.cc:2543: thd_proc_info(&thd, “upgrading lock”); sql/sql_insert.cc:2556: thd_proc_info(&thd, “insert”); sql/sql_insert.cc:2694: thd_proc_info(&thd, “reschedule”); sql/sql_insert.cc:2715: thd_proc_info(&thd, “insert”); sql/sql_insert.cc:2721: thd_proc_info(&thd, 0); sql/slave.cc:1054: thd_proc_info(thd, “Creating table from master dump”); sql/slave.cc:1069: thd_proc_info(thd, “Opening master dump table”); sql/slave.cc:1085: thd_proc_info(thd, “Reading master dump table data”); sql/slave.cc:1097: thd_proc_info(thd, “Rebuilding the index on master dump table”); sql/slave.cc:1586: thd_proc_info(thd, “Waiting for the next event in relay log”); sql/slave.cc:1588: thd_proc_info(thd, “Waiting for master update”); sql/slave.cc:2311: thd_proc_info(thd, “Connecting to master”); sql/slave.cc:2338: thd_proc_info(thd, “Checking master version”); sql/slave.cc:2347: thd_proc_info(thd, “Registering slave on master”); sql/slave.cc:2377: thd_proc_info(thd, “Requesting binlog dump”); sql/slave.cc:2408: thd_proc_info(thd, “Waiting for master to send event”); sql/slave.cc:2452: thd_proc_info(thd, “Queueing master event to the relay log”); sql/slave.cc:2527: thd_proc_info(thd, “Waiting for slave mutex on exit”); sql/slave.cc:2714: thd_proc_info(thd, “Reading event from the relay log”); sql/slave.cc:2801: thd_proc_info(thd, “Waiting for slave mutex on exit”); sql/sql_cache.cc:760: thd_proc_info(thd, “storing result in query cache”); sql/sql_cache.cc:813: thd_proc_info(thd, “storing result in query cache”); sql/sql_cache.cc:1262: thd_proc_info(thd, “checking query cache for query”); sql/sql_cache.cc:1346: thd_proc_info(thd, “checking privileges on cached query”); sql/sql_cache.cc:1441: thd_proc_info(thd, “sending cached result to client”); sql/sql_cache.cc:1518: thd_proc_info(thd, “invalidating query cache entries (table list)”); sql/sql_cache.cc:1544: thd_proc_info(thd, “invalidating query cache entries (table)”); sql/sql_class.h:1298: Set it using the thd_proc_info(THD *thread, const char *message) sql/sql_parse.cc:386: thd_proc_info(thd, “Execution of init_command”); sql/sql_parse.cc:447: thd_proc_info(thd, 0); sql/sql_parse.cc:1575: thd_proc_info(thd, “cleaning up”); sql/sql_parse.cc:1577: thd_proc_info(thd, 0); sql/sql_parse.cc:1608: thd_proc_info(thd, “logging slow query”); sql/sql_parse.cc:1618: thd_proc_info(thd, “logging slow query”); sql/sql_parse.cc:3220: thd_proc_info(thd, “init”); sql/sql_parse.cc:4799: thd_proc_info(thd, “query end”); sql/sql_parse.cc:5037: thd_proc_info(thd, “checking permissions”); sql/sql_parse.cc:5805: thd_proc_info(thd, “freeing items”); sql/repl_failsafe.cc:104: thd_proc_info(thd, “Thread initialized”); sql/repl_failsafe.cc:619: thd_proc_info(thd, “Processing request”); sql/repl_failsafe.cc:974: thd_proc_info(thd, “purging old relay logs”); sql/repl_failsafe.cc:1001: thd_proc_info(thd, “starting slave”); sql/repl_failsafe.cc:1013: thd_proc_info(thd, 0); sql/sql_repl.cc:658: thd_proc_info(thd, “Sending binlog event to slave”); sql/sql_repl.cc:696: thd_proc_info(thd, “Finished reading one binlog; switching to next binlog”); sql/sql_repl.cc:742: thd_proc_info(thd, “Waiting to finalize termination”); sql/sql_repl.cc:749: thd_proc_info(thd, “Waiting to finalize termination”); sql/sql_repl.cc:903: thd_proc_info(thd, “Killing slave”); sql/sql_repl.cc:930: thd_proc_info(thd, 0); sql/sql_repl.cc:1089: thd_proc_info(thd, “Changing master”); sql/sql_repl.cc:1220: thd_proc_info(thd, “Purging old relay logs”); sql/sql_repl.cc:1281: thd_proc_info(thd, 0); sql/sql_select.cc:762: thd_proc_info(thd, “optimizing”); sql/sql_select.cc:944: thd_proc_info(thd, “statistics”); sql/sql_select.cc:954: thd_proc_info(thd, “preparing”); sql/sql_select.cc:1408: thd_proc_info(thd, “Creating tmp table”); sql/sql_select.cc:1458: thd_proc_info(thd, “Sorting for group”); sql/sql_select.cc:1479: thd_proc_info(thd, “Sorting for order”); sql/sql_select.cc:1638: thd_proc_info(thd, “executing”); sql/sql_select.cc:1777: thd_proc_info(thd, “Copying to tmp table”); sql/sql_select.cc:1904: thd_proc_info(thd, “Creating sort index”); sql/sql_select.cc:1918: thd_proc_info(thd, “Copying to group table”); sql/sql_select.cc:1977: thd_proc_info(thd, “Removing duplicates”); sql/sql_select.cc:2040: thd_proc_info(thd, “Sorting result”); sql/sql_select.cc:2177: thd_proc_info(thd, “Sending data”); sql/sql_select.cc:2337: thd_proc_info(thd, “init”); sql/sql_select.cc:2382: thd_proc_info(thd, “end”); sql/sql_select.cc:10527: thd_proc_info(thd, “removing tmp table”); sql/sql_select.cc:10549: thd_proc_info(thd, save_proc_info); sql/sql_select.cc:10583: thd_proc_info(thd, “converting HEAP to My ISAM”); sql/sql_select.cc:10647: thd_proc_info(thd, (!

(My SQL people sometimes use the word “query” when the meaning is “statement”.) This is a number within your session, not a global number, so each connection’s query_id value starts with 1.

Each time the program reaches a new stage, this number goes up by 1.

My SQL’s query cache stores the results of previously executed queries.

How it works The data-gathering code, or “instrumentation”, goes approximately like this: statement_begin: start-and-setup-for-getting-info Stage 1: collect-data() bunch-of-code Stage 2: collect-data() bunch-of-code Stage 3: collect-data() …end-and-put-info-in-buffer And specifically the timing part of the collect-data() code looks like this: In sql/sql_profile.cc: ” void PROF_MEASUREMENT::collect() ” The my_getsystime() function gets time of day; the getrusage() function gets a little more; I’ll get into the details about ‘timing’ later.query_id Whenever you enter a new statement, your “query identifier” goes up by 1.

invalidating query cache entries mysql-25invalidating query cache entries mysql-31invalidating query cache entries mysql-40

Allow editing timing when full name is not editable.

One thought on “invalidating query cache entries mysql”