10bet网址
MySQL 8.0 Reference Manual
Related Documentation Download this Manual Excerpts from this Manual

27.12.5.1 The events_stages_current Table

Theevents_stages_currenttable contains current stage events. The table stores one row per thread showing the current status of the thread's most recent monitored stage event, so there is no system variable for configuring the table size.

Of the tables that contain stage event rows,events_stages_currentis the most fundamental. Other tables that contain stage event rows are logically derived from the current events. For example, theevents_stages_historyandevents_stages_history_long表集合ev最近的阶段ents that have ended, up to a maximum number of rows per thread and globally across all threads, respectively.

For more information about the relationship between the three stage event tables, seeSection 27.9, “Performance Schema Tables for Current and Historical Events”.

For information about configuring whether to collect stage events, seeSection 27.12.5, “Performance Schema Stage Event Tables”.

Theevents_stages_currenttable has these columns:

  • THREAD_ID,EVENT_ID

    The thread associated with the event and the thread current event number when the event starts. TheTHREAD_IDandEVENT_IDvalues taken together uniquely identify the row. No two rows have the same pair of values.

  • END_EVENT_ID

    This column is set toNULLwhen the event starts and updated to the thread current event number when the event ends.

  • EVENT_NAME

    The name of the instrument that produced the event. This is aNAMEvalue from thesetup_instrumentstable. Instrument names may have multiple parts and form a hierarchy, as discussed inSection 27.6, “Performance Schema Instrument Naming Conventions”.

  • SOURCE

    The name of the source file containing the instrumented code that produced the event and the line number in the file at which the instrumentation occurs. This enables you to check the source to determine exactly what code is involved.

  • TIMER_START,TIMER_END,TIMER_WAIT

    Timing information for the event. The unit for these values is picoseconds (trillionths of a second). TheTIMER_STARTandTIMER_ENDvalues indicate when event timing started and ended.TIMER_WAITis the event elapsed time (duration).

    If an event has not finished,TIMER_END当前的定时器值和吗TIMER_WAITis the time elapsed so far (TIMER_ENDTIMER_START).

    If an event is produced from an instrument that hasTIMED = NO, timing information is not collected, andTIMER_START,TIMER_END, andTIMER_WAITare allNULL.

    For discussion of picoseconds as the unit for event times and factors that affect time values, seeSection 27.4.1, “Performance Schema Event Timing”.

  • WORK_COMPLETED,WORK_ESTIMATED

    These columns provide stage progress information, for instruments that have been implemented to produce such information.WORK_COMPLETEDindicates how many work units have been completed for the stage, andWORK_ESTIMATEDindicates how many work units are expected for the stage. For more information, seeStage Event Progress Information.

  • NESTING_EVENT_ID

    TheEVENT_IDvalue of the event within which this event is nested. The nesting event for a stage event is usually a statement event.

  • NESTING_EVENT_TYPE

    The nesting event type. The value isTRANSACTION,STATEMENT,STAGE, orWAIT.

Theevents_stages_currenttable has these indexes:

  • Primary key on (THREAD_ID,EVENT_ID)

TRUNCATE TABLEis permitted for theevents_stages_currenttable. It removes the rows.