N1ql to upload some large documents via cbq takes a very long time

Hi @gauravj10 ,

We have tested with the Build Couchbase Server 7.6.6-6126 (EE) but still we have observe the time taken for prepared statement is still higher then the time taken by Simple insert N1QL statement.

# /opt/couchbase/bin/couchbase-server --version
Couchbase Server 7.6.6-6126 (EE)

Blockquote
File Name: np-data.cb
No Of Docs: 1624
Time taken for Insert N1QL (Simple) : 29 min 34 sec 294 ms
Time taken for Insert N1QL (Prepared) Statement : 33 min 54 sec 225 ms

Regards,
Sameer Malve

Hi @sameer.malve,

We tried running large doc (sized about 194k bytes/characters) INSERTs, but weren’t exactly able to reproduce this:

# time cbq -e 127.0.0.1 -u Administrator -p password -f full.n1ql
...
...
{
    "requestID": "bb3bcd5f-29b5-4395-a505-0803e331d4b8",
    "signature": null,
    "results": [
    ],
    "status": "success",
    "metrics": {
        "elapsedTime": "102.690417ms",
        "executionTime": "101.776958ms",
        "resultCount": 0,
        "resultSize": 0,
        "serviceLoad": 12,
        "mutationCount": 1
    }
}


real    4m37.022s
user    0m13.242s
sys     1m5.363s

For prepared statements (we had created a prepared statement separately on the UI):

# time cbq -e 127.0.0.1 -u Administrator -p password -f prepfull.n1ql
...
{
    "requestID": "e28813d6-3683-4191-9c01-f93fffe1a7aa",
    "signature": null,
    "results": [
    ],
    "status": "success",
    "metrics": {
        "elapsedTime": "5.109916ms",
        "executionTime": "2.313208ms",
        "resultCount": 0,
        "resultSize": 0,
        "serviceLoad": 12,
        "mutationCount": 1
    }
}



real    2m21.089s
user    0m28.466s
sys     1m21.715s

This output seems to be different from what you’re observing.

Below is the PREPARE statement that was created before all the EXEC statements were run:

PREPARE prep1 AS INSERT INTO test (KEY, VALUE) VALUES ($1, $2);

Could you please confirm if you’re still seeing the issue? If so, it could be useful to have a look into your .n1ql file.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.