Giter VIP home page Giter VIP logo

Comments (5)

gouhongshen avatar gouhongshen commented on May 30, 2024
create database iotdemo;
use iotdemo;

CREATE TABLE `sensor_data1` (
    `id` INT NOT NULL AUTO_INCREMENT,
    `device_id` INT NOT NULL,
    `timestamp` TIMESTAMP NOT NULL,
    `value` FLOAT NOT NULL,
    PRIMARY KEY (`device_id`,`id`));

INSERT INTO sensor_data1 (device_id, timestamp, value) select *,NOW(),1.1 from generate_series(1,10000000)g;

from matrixone.

jensenojs avatar jensenojs commented on May 30, 2024

本地测试的结果 : #15767 (comment)

create database iotdemo;
use iotdemo;

CREATE TABLE `sensor_data1` (
    `id` INT NOT NULL AUTO_INCREMENT,
    `device_id` INT NOT NULL,
    `timestamp` TIMESTAMP NOT NULL,
    `value` FLOAT NOT NULL,
    PRIMARY KEY (`device_id`,`id`));

INSERT INTO sensor_data1 (device_id, timestamp, value) select *,NOW(),1.1 from generate_series(1,10000000)g;

from matrixone.

jensenojs avatar jensenojs commented on May 30, 2024

辛苦涛哥跟踪吧, @badboynt1

from matrixone.

badboynt1 avatar badboynt1 commented on May 30, 2024

mysql> explain insert into sensor_data1 (device_id, timestamp, value) values(1,now(),1);
+-------------------------------------------------------+
| QUERY PLAN |
+-------------------------------------------------------+
| Plan 0: |
| Sink |
| -> Lock |
| -> PreInsert on iotdemo.sensor_data1 |
| -> Project |
| -> Project |
| -> Values Scan "VALUES" |
| Plan 1: |
| Insert on iotdemo.sensor_data1 |
| -> Sink Scan |
| DataSource: Plan 0 |
| Plan 2: |
| Fuzzy Filter for duplicate key |
| Runtime Filter Build: #[0,0] |
| -> Table Scan on iotdemo.sensor_data1 |
| Runtime Filter Probe: __mo_cpkey_col |
| -> Sink Scan |
| DataSource: Plan 0 |
+-------------------------------------------------------+
18 rows in set (0.01 sec)
修改后新的执行计划,已修复

from matrixone.

aressu1985 avatar aressu1985 commented on May 30, 2024

fixed:
image

from matrixone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.