How to query all utxos of an address from a full node? I am new in the blockchain field, and I am trying to build my own block explorer from scratch to really learn about Bitcoin. I am currently running a full node in a raspberry pi, and I have already decoded the chainstate/UTXO-set with a levelDB library for Node.js. The content of this database is not exactly what I found in the documentation around, but led me well enough to fully decode this database.

Basically, the keys are the transaction ids with the index of the output, and the values contain the height, wether it is a coinbase transaction or not, the amount, and the address (before the base58 encoding) of every utxo. 

However, I don't really know how to query this database in an efficient way to get all the utxos for a specific address without scanning the whole chainstate. It took me about 10 minutes to get all the utxos of a single address which is totally unacceptable. 

I guess my specific question is how do I query this database through the values instead of the keys? Or if there is a better way to do this, maybe through the blockchain itself? maybe to an RPC bitcoin-cli call?
There isn't really a way to do this efficiently, as Bitcoin Core is not designed for that.

You can search using the the scantxoutset RPC command, but all that is doing is iterating over the entire database and returning matching entries (it's more powerful than just by address though; it can for example search for an xpub + derivation path too).

There is some work around adding support for an optional (and separate) address-based index to Bitcoin Core, but that will at the earliest be for v0.21.

Other than that, there are a number of other software packages that can build such an index (independently from Bitcoin Core).