<form id="hz9zz"></form>
  • <form id="hz9zz"></form>

      <nobr id="hz9zz"></nobr>

      <form id="hz9zz"></form>

    1. 明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

      MySQL數據庫中應當怎么實施info()函數

      [摘要]執行表掃描操作之前,將調用info()函數,以便為優化程序提供額外信息。 優化程序所需的信息不是通過返回值給定的,你需填充存儲引擎類的特定屬性,當info()調用返回后,優化程序將讀取存儲引擎類。...

      執行表掃描操作之前,將調用info()函數,以便為優化程序提供額外信息。

      優化程序所需的信息不是通過返回值給定的,你需填充存儲引擎類的特定屬性,當info()調用返回后,優化程序將讀取存儲引擎類。

      除了供優化程序使用外,在調用info()函數期間,很多值集合還將用于SHOW TABLE STATUS語句。

      在sql/handler.h中列出了完整的公共屬性,下面給出了一些常見的屬性:

      以下為引用的內容:
      ulonglong data_file_length;    
      /* Length off data file */
      ulonglong max_data_file_length;
      /* Length off data file */
      ulonglong index_file_length;
      ulonglong max_index_file_length;
      ulonglong delete_length; 
      /* Free bytes */
      ulonglong auto_increment_value;
      ha_rows records;   
      /* Records in table */
      ha_rows deleted;   
      /* Deleted records */
      ulong raid_chunksize;
      ulong mean_rec_length;  
      /* physical reclength */
      time_t create_time;
      /* When table was created */
      time_t check_time;
      time_t update_time;

      對于表掃描,最重要的屬性是"records",它指明了表中的記錄數。當存儲引擎指明表中有0或1行時,或有2行以上時,在這兩種情況下,優化程序的執行方式不同。因此,當你在執行表掃描之前不清楚表中有多少行時,應返回大于等于2的值,這很重要(例如,數據是在外部填充的)。

      關鍵詞標簽:函數,實施,如何,數據庫

      學習教程快速掌握從入門到精通的SQL知識。




      日韩精品一区二区三区高清