Tidb 8.1 import into mytable from select vs temporary table insert into #66498
Replies: 1 comment
|
Original author: TiDB-AI-Assistant 1. Support for Temporary Tables in
|
|
Original author: TiDB-AI-Assistant 1. Support for Temporary Tables in
|
Uh oh!
There was an error while loading. Please reload this page.
Original author: gary
Original time: 2024-07-14 14:07:00.446423
Original ID/Slug: 10030 / tidb-8-1-import-into-mytable-from-select-vs-temporary-table-insert-into
I’m testing tidb 8.1 new feature: IMPORT INTO mytable FROM SELECT
( IMPORT INTO | PingCAP Docs )
I thought it’ll be faster than “INSERT IGNORE INTO mytable SELECT”
but looks like wrong.
here mytable is a temporary table created by “CREATE TEMPORARY TABLE” only has one bigint column,
2 questions:
is “import into mytable from select” support temporary table ?
while this should be easy to do the tests by myself, I’d like to get confirmation from tidb official document. I guess not support.
performance issue as the topic
with tidb 8.1,
A. “IMPORT INTO mytable FROM SELECT …”, which mytable is a normal table not temporary table
B. create temporary table tmp_table(id bigint);
INSERT IGNORE INTO tmp_table select …
which is faster between A and B ?
to my surprise, it looks B is faster than A from my quick tests.
All reactions