Question: I am new to Monaco editor. I am trying to include Monaco editor in my web application. I want to know how can I add a custom language defined by me into Monaco editor with rich IntelliSense and validation. Can anyone help me on this? Thank you.

Answer: 
Turn

```
NOT IN ( SELECT ... )

```

into either

```
NOT EXISTS ( SELECT ... )

```

or

```
LEFT JOIN ... WHERE .. IS NULL

```

Then see if you can get rid of more subqueries.

If those don't speed it up enough, I'll look again.

The likely reason is that MariaDB has a feature that MySQL does not have: subquery caching. Also, MySQL has 3 major versions after 5.5, and there are some significant optimization improvements in them.

It would be interesting to see `SHOW VARIABLES` and `SHOW GLOBAL STATUS` from each server (plus RAM size). From that, I think I can point out that the caching is in use.

Meanwhile, my goal in the reformulation suggestions is to speed up MySQL (and maybe MariaDB).
1. Looks like there is a redundant left join which isn't used anywhere, so it will be helpful to remove it: `claim_req_cc`
2. Try to modify NOT IN to NOT EXISTS, as Rick mentioned.