Skip to content

Insert select query to existing table fails with 6000 columns #3312

@chandler150

Description

@chandler150

Describe the bug

I am attempting to insert 1700rowsx6000columns to an existing table of the same column size/names.
I am running the query:

`with nondupes AS (
SELECT tab1.*
FROM DBtemp tab1
LEFT OUTER JOIN DB tab2
ON tab1.timestamp = tab2.timestamp
AND tab1.sensor= tab2.sensor
WHERE tab2.timestamp = NULL)

INSERT INTO 'CMSDB'
SELECT * from nondupes;`

This code works on a smaller dataset, but once expanded to full size, I am getting this error in the logs:

`2023-05-09T17:07:59.490908Z E i.q.s.BytecodeAssembler Too much input to generate io.questdb.griffin.RecordToRowCopier. Bytecode >2023-05-09T17:07:59.493190Z C i.q.c.h.p.JsonQueryProcessorState [114] Uh-oh. Error!
io.questdb.std.ex.BytecodeException: Error in bytecode
at io.questdb.std.ex.BytecodeException.(BytecodeException.java:28)
at io.questdb.std.BytecodeAssembler.endMethodCode(BytecodeAssembler.java:199)
at io.questdb.griffin.RecordToRowCopierUtils.generateCopier(RecordToRowCopierUtils.java:812)
at io.questdb.griffin.SqlCompiler.insertAsSelect(SqlCompiler.java:2153)
at io.questdb.griffin.SqlCompiler.executeWithRetries(SqlCompiler.java:1852)
at io.questdb.griffin.SqlCompiler.compileUsingModel(SqlCompiler.java:1343)
at io.questdb.griffin.SqlCompiler.compileInner(SqlCompiler.java:1271)
at io.questdb.griffin.SqlCompiler.compile(SqlCompiler.java:268)
at io.questdb.cutlass.http.processors.JsonQueryProcessor.compileQuery(JsonQueryProcessor.java:423)
at io.questdb.cutlass.http.processors.JsonQueryProcessor.execute0(JsonQueryProcessor.java:186)
at io.questdb.cutlass.http.processors.JsonQueryProcessor.onRequestComplete(JsonQueryProcessor.java:236)
at io.questdb.cutlass.http.HttpConnectionContext.handleClientRecv(HttpConnectionContext.java:604)
at io.questdb.cutlass.http.HttpConnectionContext.handleClientOperation(HttpConnectionContext.java:203)
at io.questdb.cutlass.http.HttpServer$1.lambda$$0(HttpServer.java:86)
at io.questdb.network.AbstractIODispatcher.processIOQueue(AbstractIODispatcher.java:189)
at io.questdb.cutlass.http.HttpServer$1.run(HttpServer.java:101)
at io.questdb.mp.Worker.run(Worker.java:118)

2023-05-09T17:07:59.493243Z I i.q.c.h.HttpConnectionContext kicked out [fd=114]
2023-05-09T17:07:59.493250Z I http-server scheduling disconnect [fd=114, reason=5]`

To reproduce

  1. create DB with 6000 rows, indexed on timestamp and one other symbol
  2. attempt to Insert 1000 new rows

Expected Behavior

I am expecting to change something in the server.conf to increase the buffer size

Environment

- **QuestDB version 7.1.1**:
- **OS Ubuntu 22.04**:
- **Browser Chrome**:

Additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions