国产成人精品18p,天天干成人网,无码专区狠狠躁天天躁,美女脱精光隐私扒开免费观看

如何解決查詢(xún)結果集很小但Created_tmp_disk_tables不斷

發(fā)布時(shí)間:2021-09-14 18:07 來(lái)源:億速云 閱讀:0 作者:柒染 欄目: Mysql 歡迎投稿:712375056

這期內容當中小編將會(huì )給大家帶來(lái)有關(guān)如何解決查詢(xún)結果集很小但Created_tmp_disk_tables不斷增加的問(wèn)題,文章內容豐富且以專(zhuān)業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。

create table tb(id int , va varchar(10));

insert into tb(id, va) values (1, 'Created_tmp_disk_tables');

Some query conditions prevent the use of an in-memory temporary table, in which case the server uses an on-disk table instead:

Presence of a BLOB or TEXT column in the table. This includes user-defined variables having a string value because they are treated as BLOB or TEXT columns, depending on whether their value is a binary or nonbinary string, respectively.

# BLOB、TEXT列, 或者自定義變量被按BLOB、TEXT類(lèi)型處理

alter table tb modify va text;

select * from (select * from tb) t;

Presence of any string column with a maximum length larger than 512 (bytes for binary strings, characters for nonbinary strings) in the SELECT list, if UNION or UNION ALL is used.

# 列長(cháng)度定義超過(guò)512,在union時(shí)

alter table tb modify va varchar(513);

select * from tb union select * from tb;

The SHOW COLUMNS and DESCRIBE statements use BLOB as the type for some columns, thus the temporary table used for the results is an on-disk table.

# 查詢(xún)表的列信息時(shí)。這個(gè)比較坑

SHOW columns from tb ;

DESCRIBE tb;

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng )、來(lái)自本網(wǎng)站內容采集于網(wǎng)絡(luò )互聯(lián)網(wǎng)轉載等其它媒體和分享為主,內容觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如侵犯了原作者的版權,請告知一經(jīng)查實(shí),將立刻刪除涉嫌侵權內容,聯(lián)系我們QQ:712375056,同時(shí)歡迎投稿傳遞力量。

天下第二社区在线视频| 亚洲 日本 欧美 中文字幕| 久久国产福利一区二区| 国产精品第12页| 毛片免费视频观看| 麻豆最新国产AV原创精品|