I have a python list, which has ~20k items in it. These are integers.
I would like to INSERT all these integers.
For integers that already exist, I would like to increment the second row, that we'll call amount by one.
Since there are ~20k items, it seems very slow to iter through all of them and insert them one by one. Is there any way to do this in one query?
I'm using the asyncpg library.