-
Notifications
You must be signed in to change notification settings - Fork 34
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excessive database query when getting resource index (select ... from ... where id is null) #6564
Comments
Unable to reproduce the issue, please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example) |
What happens if |
In what scenario does it become |
As far as I understand, this happens when the available actions are received.
|
I saw this when I logged all the queries being executed to the database. |
And in principle, it doesn't matter in what scenario this can happen, if the |
Unable to replicate this on MySQL or SQLite. Seem to be specific issue to Oracle which we don't have official support. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Description:
When we open the resource index, the system makes a strange query to the database like this:
select * from (select * from "TABLE" where "TABLE"."ID" is null) where rownum = 1
In this case, "id" is the primary key. This behavior is implemented in the method
findModel($resourceId = null)
in the trait\vendor\laravel\nova\src\Http\Requests\InteractsWithResources.php
Such a query is executed every time when accessing the index of any resource that does not carry any logic. However, given a large table in the database, it greatly affects performance.
The text was updated successfully, but these errors were encountered: