High Latency in Worker KV write and D1 Insert/Select

For Workes & Pages, what is the name of the domain?

ttps://kv-d1-benchmark.payhunter.workers.dev/

What is the issue or error you’re encountering

High Latency in Worker KV write and D1 Insert/Select

What steps have you taken to resolve the issue?

NA

What are the steps to reproduce the issue?

Testest using GitHub - bruceharrison1984/kv-d1-benchmark: A very small Cloudflare Worker that compares response times of KV to D1.
{
“kv_insert”: “475ms”,
“kv_read”: “2ms”,
“kv_insert_and_propagate”: “1443ms”,
“d1_insert”: “1153ms”,
“d1_read”: “1144ms”,
“d1_insert_and_propagate”: “2109ms”
}

1 Like

My program is experiencing the same issue; the wait time for executing a database operation is generally over 150ms, while the database query times shown in the console are all under 1ms. I believe this is a significant problem.

1 Like

Do you still see the same numbers? Out of curiosity I deployed the same thing, here’s what I get

{
"kv_insert": "254ms",
"kv_read": "11ms",
"kv_insert_and_propagate": "241ms",
"d1_insert": "195ms",
"d1_read": "193ms",
"d1_insert_and_propagate": "360ms"
}

this is the latest result.
{
“kv_insert”: “133ms”,
“kv_read”: “5ms”,
“kv_insert_and_propagate”: “120ms”,
“d1_insert”: “48ms”,
“d1_read”: “31ms”,
“d1_insert_and_propagate”: “57ms”
}

1 Like