I am trying to migrate the data and insert the history into QuestDB. I create the table as
create table records(
type INT,
interval INT,
timestamp TIMESTAMP,
name STRING) timestamp(timestamp)
And inserts data through JDBC.
1. Question details
I received the error “cannot insert rows out of order”. I read that QuestDB supports are out of order, but somehow I can’t make it work.
Caused by: org.postgresql.util.PSQLException: ERROR: Cannot insert rows out of order. Table=/root/.questdb/db/dwd_robot_running_data
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2674)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2364)
... 19 more
2. Cause of problem
You can only insert rows in the partitioned table out of order, create a new partitioned table and copy the data into it
3. Solution
Adding partitions during table creation
create table records2(
type INT,
interval INT,
timestamp TIMESTAMP,
name STRING
)
timestamp(timestamp) partition by DAY
insert into records2
select * from records
drop table records
rename table records2 to records
After that, you can insert out of order into the table records
Read More:
- [Solved] The number of rows returned by the mybatis UPDATE statement is always 1 or useaffectedrows = true
- SQL Server Group sort de duplication row_ number() over ( PARTITION BY t1.col_ 2 ORDER BY 1 )
- MySQL OrderBy Error: Expression #1 of ORDER BY
- The setobject() method reports an error. The parameter index out of range and MySQL syntax error exception report an error
- [Solved] MySQL Error: Can‘t find record in ‘order_form‘
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)
- Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 – Connection is not available, request timed out after 30005ms.
- How to Solve “Out of range value for column” Error
- [Solved] ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full comm
- nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression [Solved]
- Introduction to Relational Databases in SQL
- [Solved] ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘
- MYSQL: CURRENT_TIMESTAMP & ON UPDATE CURRENT_TIMESTAMP
- MySQL automatically creates partitions through events
- [Solved] PostgreSQL enumeration type usage error: operator does not exist error handling
- [Solved]ERROR 1067 (42000): Invalid default value for ‘end_time‘ Mysql
- [Solved] ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
- Kettle stores data report ora-00600 to Oracle: internal error parameters [KQD object $], [u], [0], [107], [CS], []
- [Solved] flask db init Error: KeyError: ‘migrate‘