Regarding slowness of update queries

73 views
Skip to first unread message

Sushil pratap singh

unread,
May 23, 2021, 1:25:02 PM5/23/21
to CockroachDB
Hi ,

We are getting more than 10k writes (4200 inserts + 5800 updates) per second. 
  • when i was running single insert query it was taking more than 3ms , So i am now creating bulk insertion with which i am able to execute 1 insert query in 0.11 ms. i.e nearly 8000 inserts per second
  • But my update queries are very slow each taking 5-10 ms per query i.e 200 updates/sec only . I have to take it to 5000-10000 updates per second
  • basically there are 2 type of updates one is on non indexed column so it's performance can be improved by multithreading from client. But another query uses indexes in which i may not get too much advantage of multi threading
Is there any way i can achieve this in cockroach db.

Please help !!! , it's sort of urgent 

Thanks

Sushil Pratap Singh

Andrew Werner

unread,
May 24, 2021, 12:51:44 PM5/24/21
to Sushil pratap singh, CockroachDB
On Sun, May 23, 2021 at 1:25 PM Sushil pratap singh <sushi...@gmail.com> wrote:
Hi ,

We are getting more than 10k writes (4200 inserts + 5800 updates) per second. 
  • when i was running single insert query it was taking more than 3ms , So i am now creating bulk insertion with which i am able to execute 1 insert query in 0.11 ms. i.e nearly 8000 inserts per second
  • But my update queries are very slow each taking 5-10 ms per query i.e 200 updates/sec only . I have to take it to 5000-10000 updates per second
  • basically there are 2 type of updates one is on non indexed column so it's performance can be improved by multithreading from client. But another query uses indexes in which i may not get too much advantage of multi threading
i don’t understand what you mean when you say you don’t get much advantage of multi-threading when using an index. Secondary index writes can be parallelized in the same ways as primary index writes. Have you tried parallelizing the writes?

There may be something else going on preventing scalability. Are any of the indexes on values which are increasing, like a timestamp? If so, sharding the index will likely help. 
Is there any way i can achieve this in cockroach db.

Please help !!! , it's sort of urgent 

Thanks

Sushil Pratap Singh

--
You received this message because you are subscribed to the Google Groups "CockroachDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cockroach-db...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cockroach-db/023edcdd-dc60-4b0f-b929-38afec8e0e6bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages