Incorrect description of temporary tables in Docs

Hi, Team

I think the documentation for temporary tables is incorrect.
(SingleStoreDB Cloud · SingleStore Documentation)

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,
  KEY `i` (`i`) USING CLUSTERED COLUMNSTORE
  , SHARD KEY ()
) SQL_MODE='STRICT_ALL_TABLES'
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.

Hello,

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.

-g-

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: List of Engine Variables · SingleStore Documentation) it looks like we missed that topic when we updated the documentation. :slight_smile:

1 Like