why mongodb speed of sort by subdocument field so slow?

my test collection has these fields { “block_number”: 123123, “value”: 555.55555 “transfers”: [ { “from”: “foo1”, “to”: “bar1”, “amount”: 111.111 }, { “from”: “foo2”, “to”: “bar2”, “amount”: 222.222 }, … { “from”: “foo3”, “to”: “bar3”, “amount”: 100.100 }, ] }, … { … } and I made indexes like this (at python code) tx_collection.create_index(“block_number”) tx_collection.create_index(“transfers.amount”)…

How to find related items based on a condition like minimum date in Neo4j?

I have a data model where we have projects and milestones. One project can have many milestones. I’d like to list each project and the milestone with the minimum date. In the case of: project1 -> milestone1 {date: ‘2019-01-01’} project1 -> milestone2 {date: ‘2019-3-03’} project2 -> milestone3 {date: ‘2018-01-01’} project2 -> milestone4 {date: ‘2019-03-03’} I…

Looping using for or For_each | Terraform 0.12

I need to create multiple subnets in GCP within a network. I am planning to use Terraform 0.12 syntax for the same as follows: project_name = [ “order-dev”, “ship-dev” ] variable “project_name” { type = list(string) description = “Name of the project” } resource “google_compute_subnetwork” “subnetwork” { name = “${var.project_name}-subnetwork” ip_cidr_range = var.subnet_ip_cidr_range region =…