Skip to content

How to improve performance #4816

Closed Answered by fengjiachun
jason-heo asked this question in Q&A
Oct 11, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hello, looking at the four types of query statements you listed, external tables seem to be a more suitable choice.

If you still want to try the native table, modify the create table statement to:

CREATE TABLE IF NOT EXISTS native_table (
  row_id STRING,
  blog_id STRING,
  doc_id STRING,
  visitor_id STRING,
  ts TIMESTAMP TIME INDEX DEFAULT '1970-01-01 00:00:00+0000',
) WITH ('append_mode'='true');

I made two modifications based on your table creation statement:

  1. Removed the setting of PRIMARY KEY(row_id)
  2. 'append_mode' allows the table to append data without overwriting duplicates

I also have a question: Does the ts column in your data file represent actual time, or is it just a fixe…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jason-heo
Comment options

@jason-heo
Comment options

@zhongzc
Comment options

Answer selected by jason-heo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants