How should I store executed queries from postgresql?

I have a lot of tables in postgresql. And I have to exit to get these json responses from the API (objects nested in each other).
These data are requested with high frequency. Despite the database indexes do not cope with the load. Thus came the idea to store in a NOSQL solution such as MongoDB and where the data should be sorted and filtered so on. Which solution is best suited? I still consider Apache Solr and MongoDB.

ps: I'm new in highload systems.

[
{
 "id": 222,
 "status": 3,
 "client_id": 9,
 "client": {
 "id": 0,
 "role": "",
 "mode": "",
 "login": "",
 "firstname": "",
 "surname": "",
 "sex": "",
 "photo": "",
 "photo_url": "",
 "car_brand": "",
 "car_model": "",
 "car_number": "",
 "car_year": 0,
 "car_color": "",
 "car_photo": "",
 "car_photo_url": "",
 "created_at": 0,
 "born_date": "",
 "city_id": 0,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "ban": false,
 "subscription": false,
 "raiting": 0,
 "balance": 0,
 "delay": 0,
 "delay_fixed": false,
 "is_checked": false
},
 "driver_id": 1,
 "driver": {
 "id": 0,
 "role": "",
 "mode": "",
 "login": "",
 "firstname": "",
 "surname": "",
 "sex": "",
 "photo": "",
 "photo_url": "",
 "car_brand": "",
 "car_model": "",
 "car_number": "",
 "car_year": 0,
 "car_color": "",
 "car_photo": "",
 "car_photo_url": "",
 "created_at": 0,
 "born_date": "",
 "city_id": 0,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "ban": false,
 "subscription": false,
 "raiting": 0,
 "balance": 0,
 "delay": 0,
 "delay_fixed": false,
 "is_checked": false
},
 "city_id": 1000,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "created_at": 1581226919,
 "in_way_at": 1581226959,
 "arrived_at": 1581226989,
 "completed_at": 1581227021,
 "sum": 150,
 "countdown": 300,
 "address_from": "Caves",
 "address_to": "Tavern"
 "extra": "",
 "mobile_pay": false,
 "arrived": true,
 "leaving": true,
 "ride": 2,
 "reason": ""
},
{
 "id": 220,
 "status": 3,
 "client_id": 9,
 "client": {
 "id": 0,
 "role": "",
 "mode": "",
 "login": "",
 "firstname": "",
 "surname": "",
 "sex": "",
 "photo": "",
 "photo_url": "",
 "car_brand": "",
 "car_model": "",
 "car_number": "",
 "car_year": 0,
 "car_color": "",
 "car_photo": "",
 "car_photo_url": "",
 "created_at": 0,
 "born_date": "",
 "city_id": 0,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "ban": false,
 "subscription": false,
 "raiting": 0,
 "balance": 0,
 "delay": 0,
 "delay_fixed": false,
 "is_checked": false
},
 "driver_id": 1,
 "driver": {
 "id": 0,
 "role": "",
 "mode": "",
 "login": "",
 "firstname": "",
 "surname": "",
 "sex": "",
 "photo": "",
 "photo_url": "",
 "car_brand": "",
 "car_model": "",
 "car_number": "",
 "car_year": 0,
 "car_color": "",
 "car_photo": "",
 "car_photo_url": "",
 "created_at": 0,
 "born_date": "",
 "city_id": 0,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "ban": false,
 "subscription": false,
 "raiting": 0,
 "balance": 0,
 "delay": 0,
 "delay_fixed": false,
 "is_checked": false
},
 "city_id": 1,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "created_at": 1580476031,
 "in_way_at": 1580476419,
 "arrived_at": 1580476421,
 "completed_at": 1580476452,
 "sum": 100,
 "countdown": 180,
 "address_from": "Поликлиника2",
 "address_to": "Hero Popova, 61 K4",
 "extra": "",
 "mobile_pay": false,
 "arrived": true,
 "leaving": false,
 "ride": 1,
 "reason": ""
},
{
 "id": 218,
 "status": 3,
 "client_id": 2,
 "client": {
 "id": 0,
 "role": "",
 "mode": "",
 "login": "",
 "firstname": "",
 "surname": "",
 "sex": "",
 "photo": "",
 "photo_url": "",
 "car_brand": "",
 "car_model": "",
 "car_number": "",
 "car_year": 0,
 "car_color": "",
 "car_photo": "",
 "car_photo_url": "",
 "created_at": 0,
 "born_date": "",
 "city_id": 0,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "ban": false,
 "subscription": false,
 "raiting": 0,
 "balance": 0,
 "delay": 0,
 "delay_fixed": false,
 "is_checked": false
},
 "driver_id": 1,
 "driver": {
 "id": 0,
 "role": "",
 "mode": "",
 "login": "",
 "firstname": "",
 "surname": "",
 "sex": "",
 "photo": "",
 "photo_url": "",
 "car_brand": "",
 "car_model": "",
 "car_number": "",
 "car_year": 0,
 "car_color": "",
 "car_photo": "",
 "car_photo_url": "",
 "created_at": 0,
 "born_date": "",
 "city_id": 0,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "ban": false,
 "subscription": false,
 "raiting": 0,
 "balance": 0,
 "delay": 0,
 "delay_fixed": false,
 "is_checked": false
},
 "city_id": 1,
 "city": {
 "id": 0,
 "name": "",
 "name_full": ""
},
 "created_at": 1580472226,
 "in_way_at": 1580472296,
 "arrived_at": 1580475761,
 "completed_at": 1580475981,
 "sum": 100,
 "countdown": 180,
 "address_from": "Clinic",
 "address_to": "Hero Popova, 61 K4",
 "extra": "",
 "mobile_pay": false,
 "arrived": true,
 "leaving": false,
 "ride": 1,
 "reason": ""
 },
April 7th 20 at 15:24
1 answer
April 7th 20 at 15:26
Redis and optimize the structure of the database.
Since redis store key value how to search and filter data? - Queenie_Goodwin commented on April 7th 20 at 15:29
@kelley_Reich, the query hash as the key. - paul.Volkman commented on April 7th 20 at 15:32

Find more questions by tags ApacheMongoDBPostgreSQL