Incorrect description of temporary tables in Docs

Hi, Team

I think the documentation for temporary tables is incorrect.

As shown below,
I was able to create a Columnstore table and I saw disk usage increase in the Studio dashboard.

singlestore> create temporary table tmp (i int, v varchar(100), sort key(i));
Query OK, 0 rows affected (0.04 sec)

singlestore> show create table tmp\G
*************************** 1. row ***************************
       Table: tmp
Create Table: CREATE TEMPORARY TABLE `tmp` (
  `i` int(11) DEFAULT NULL,
  `v` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  , SHARD KEY ()
1 row in set (0.00 sec)

singlestore> show tables extended;
| Tables_in_test | Table_type             | distributed | Storage_type      |
| g_tmp          | GLOBAL TEMPORARY TABLE |           1 | INMEMORY_ROWSTORE |
| messages       | BASE TABLE             |           1 | COLUMNSTORE       |
| test_tbl       | BASE TABLE             |           1 | COLUMNSTORE       |
**| tmp            | TEMPORARY TABLE        |           1 | COLUMNSTORE       |**
4 rows in set (0.00 sec)

Best regards.


I see what you mean, since we currently say:

Temporary tables are designed for temporary, intermediate computations and can only be created in rowstores.

Iā€™ll look into this and make sure the docs are correct. Great catch.


1 Like

Yes, but there is one more.

Temporary tables exist, storing data in memory, for the duration of a client session.

Columnstore temporary tables seem to be stored primarily on disk just like regular columnstore tables.

Correct, that text is specific to rowstore tables (Iā€™m fixing that as well), and now that ā€“ since 7.3 ā€“ you can create temporary tables as columnstore (in SingleStore DB, whatever default_table_type is set to: it looks like we missed that topic when we updated the documentation. :slight_smile:

1 Like