SELECT 
  cscart_logs.*, 
  cscart_users.firstname, 
  cscart_users.lastname 
FROM 
  cscart_logs 
  LEFT JOIN cscart_users USING(user_id) 
WHERE 
  1 
  AND (
    cscart_logs.timestamp >= 1732253669 
    AND cscart_logs.timestamp <= 1732257269
  ) 
  AND cscart_logs.type = 'requests' 
  AND cscart_logs.action = 'shipping' 
ORDER BY 
  cscart_logs.timestamp desc, 
  cscart_logs.log_id desc

Query time 0.00099

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "5.01"
    },
    "ordering_operation": {
      "using_filesort": false,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_logs",
            "access_type": "range",
            "possible_keys": [
              "type",
              "idx_timestamp"
            ],
            "key": "idx_timestamp",
            "used_key_parts": [
              "timestamp"
            ],
            "key_length": "4",
            "rows_examined_per_scan": 2,
            "rows_produced_per_join": 1,
            "filtered": "50.00",
            "index_condition": "((`webmarco`.`cscart_logs`.`timestamp` >= 1732253669) and (`webmarco`.`cscart_logs`.`timestamp` <= 1732257269))",
            "cost_info": {
              "read_cost": "3.61",
              "eval_cost": "0.20",
              "prefix_cost": "3.81",
              "data_read_per_join": "144"
            },
            "used_columns": [
              "log_id",
              "user_id",
              "timestamp",
              "type",
              "event_type",
              "action",
              "object",
              "content",
              "backtrace",
              "company_id"
            ],
            "attached_condition": "((`webmarco`.`cscart_logs`.`type` = 'requests') and (`webmarco`.`cscart_logs`.`action` = 'shipping'))"
          }
        },
        {
          "table": {
            "table_name": "cscart_users",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "user_id"
            ],
            "key_length": "3",
            "ref": [
              "webmarco.cscart_logs.user_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "1.00",
              "eval_cost": "0.20",
              "prefix_cost": "5.01",
              "data_read_per_join": "6K"
            },
            "used_columns": [
              "user_id",
              "firstname",
              "lastname"
            ]
          }
        }
      ]
    }
  }
}

Result

log_id user_id timestamp type event_type action object content backtrace company_id firstname lastname
1314123 0 1732257267 requests N shipping a:4:{s:3:"url";s:43:"https://wwwcie.ups.com:443/ups.app/xml/Rate";s:7:"request";s:1409:"'<?xml version="1.0"?><AccessRequest xml:lang="en-US"><AccessLicenseNumber></AccessLicenseNumber><UserId>2021021214131415</UserId><Password>C;&amp;w&lt;.72iX.csV6</Password></AccessRequest><?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"><Request><SubVersion>2201</SubVersion><TransactionReference><CustomerContext>Rate Request</CustomerContext><XpciVersion>1.0</XpciVersion></TransactionReference><RequestAction>Rate</RequestAction></Request><PickupType><Code>01</Code></PickupType><Shipment><Service><Code>96</Code></Service><Shipper><Address><PostalCode>02125</PostalCode><CountryCode>AL</CountryCode></Address></Shipper><ShipTo><Address><StateProvinceCode></StateProvinceCode><PostalCode></PostalCode><CountryCode></CountryCode><ResidentialAddressIndicator></ResidentialAddressIndicator></Address></ShipTo><ShipFrom><Address><StateProvinceCode>AL-11</StateProvinceCode><PostalCode>02125</PostalCode><CountryCode>AL</CountryCode><ResidentialAddressIndicator></ResidentialAddressIndicator></Address></ShipFrom><NumOfPieces>1</NumOfPieces><Package><PackagingType><Code>01</Code></PackagingType><Dimensions><UnitOfMeasurement><Code>CM</Code></UnitOfMeasurement><Length>10</Length><Width>10</Width><Height>10</Height></Dimensions><PackageWeight><UnitOfMeasurement><Code>KGS</Code></UnitOfMeasurement><Weight>0.1</Weight></PackageWeight></Package></Shipment></RatingServiceSelectionRequest>'";s:8:"response";s:479:"<?xml version="1.0"?> <RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rate Request</CustomerContext><XpciVersion>1.0</XpciVersion></TransactionReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>250003</ErrorCode><ErrorDescription>Invalid Access License number</ErrorDescription></Error></Response></RatingServiceSelectionResponse>";s:8:"shipping";s:13:"upsdeprecated";} 0