[MXS-4026] Query Editor Cache Created: 2022-02-23 Updated: 2022-09-08 Resolved: 2022-09-08 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | N/A |
| Affects Version/s: | None |
| Fix Version/s: | N/A |
| Type: | New Feature | Priority: | Major |
| Reporter: | Naresh Chandra | Assignee: | Todd Stoffel (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Implement query editor cache, instead of hitting the same query multiple times to the DB. |
| Comments |
| Comment by markus makela [ 2022-03-01 ] |
|
Isn't this doable already with the cache filter in MaxScale? |
| Comment by Naresh Chandra [ 2022-03-01 ] |
|
Hi Markus, Not sure, how to add a filter for every server? I know we can add filter for a service. |
| Comment by markus makela [ 2022-03-01 ] |
|
You could create a service with the filter and then connect to that if you want the results to be cached. |
| Comment by Naresh Chandra [ 2022-03-01 ] |
|
Can we have a global cache for query editor? as we are using source as Server? |
| Comment by markus makela [ 2022-03-01 ] |
|
As a workaround for the current version, creating a service with the desired filter should allow customization of the routing pipeline. As for doing this for the servers, I don't know how complex it would be to implement. |
| Comment by Naresh Chandra [ 2022-03-01 ] |
|
Yeah got it. if we can have query editor cache filter globally when we use query editor or any query goes through query editor that should be cached globally may help us to improvise the query. Few developers thinking that query is very slow if use from query editor. |
| Comment by markus makela [ 2022-03-01 ] |
|
Is the query faster when executed from the command line? If the query itself is slow and it is important that the result is up-to-date, then caching in the GUI would be a sub-optimal solution as the invalidation of the cache gets complex very fast. |
| Comment by Naresh Chandra [ 2022-03-01 ] |
|
Yes, command line its faster and its not a slow query as per the developers, even i have checked it. |
| Comment by markus makela [ 2022-03-01 ] |
|
If you can reproduce the slowness of the query in the GUI while it is fast in the command line, please open a separate bug report for that. Hopefully we can improve the performance even if no caching is yet implemented. |
| Comment by Naresh Chandra [ 2022-03-01 ] |
|
Yeah Sure, I will create another bug. Can you consider this ticket to cache for server as well. |
| Comment by Naresh Chandra [ 2022-03-02 ] |
|
Hi Markus, Can we implement like below? [split-router-cache] *[server1] If we can filters option like above then we can cache the data if select source as a Server. Actually we tried like below, but we are getting the below error. [Server1_Service] [Server1_Service_Listener] *Error 1815: Internal error: Session creation failed * |
| Comment by markus makela [ 2022-03-02 ] |
|
The reason why the session creation failed is explained in the MaxScale log. |
| Comment by Naresh Chandra [ 2022-03-02 ] |
|
Checked the error logs but not sure where its giving the error. *[server1] |
| Comment by Naresh Chandra [ 2022-03-24 ] |
|
Hi Markus, In our case, we can't use the service, that's why we are using server as a source. Can you please add the cache filter for server as well.? like below. *[server1] |
| Comment by markus makela [ 2022-03-24 ] |
|
Adding filters for servers is technically a bit challenging as all filters currently assume they work with a service. Not impossible but it's definitely a lot of work to implement caching for the GUI this way. |
| Comment by Naresh Chandra [ 2022-03-24 ] |
|
Actually, we are unable to open the service ports that's why we are using the server as a source. |
| Comment by markus makela [ 2022-03-24 ] |
|
Do you mean when you select the listener as the source from the GUI, the query does not work? |
| Comment by Naresh Chandra [ 2022-03-24 ] |
|
No, even we are unable to connect the db, we are getting the below error. Connection to [::]:9999 failed. Error 2002: Can't connect to server on '::' (113) |
| Comment by markus makela [ 2022-03-24 ] |
|
Ah, that might actually be a bug that we can fix. Can you open a bug report for that? |
| Comment by Naresh Chandra [ 2022-03-24 ] |
|
Sure, will raise a bug then. |
| Comment by Naresh Chandra [ 2022-03-25 ] |
|
Hi Markus, Can you please enable the global cache for only the Query editor. It doesn't matter whatever the source its is, either Server or Listener. But can you please implement the Global cache for only to the Query editor? Or Can you please implement the local cache(System/Browser cache) for the query editor? |