Comments (5)
Please elaborate.
from yii2-debug.
Sorry for that.
Now, the yii\debug\actions\db\ExplainAction
, executed this to fetch explain result:
https://github.com/yiisoft/yii2-debug/blob/master/actions%2Fdb%2FExplainAction.php#L30
This can only query one result, but generally, there are not just one.
Why not query out all result of explain?
from yii2-debug.
Are you sure it returns multiple rows?
from yii2-debug.
Yes. if there is.
$query = 'SELECT * FROM qa_question LEFT JOIN qa_answer ON qa_answer.question_id = qa_question.id';
$result = Yii::$app->getDb()->createCommand('EXPLAIN ' . $query)->queryAll();
var_dump($result);
array (size=2)
0 =>
array (size=10)
'id' => string '1' (length=1)
'select_type' => string 'SIMPLE' (length=6)
'table' => string 'qa_question' (length=11)
'type' => string 'ALL' (length=3)
'possible_keys' => null
'key' => null
'key_len' => null
'ref' => null
'rows' => string '649' (length=3)
'Extra' => null
1 =>
array (size=10)
'id' => string '1' (length=1)
'select_type' => string 'SIMPLE' (length=6)
'table' => string 'qa_answer' (length=9)
'type' => string 'ref' (length=3)
'possible_keys' => string 'idx_q' (length=5)
'key' => string 'idx_q' (length=5)
'key_len' => string '4' (length=1)
'ref' => string 'lxpgw_0828.qa_question.id' (length=25)
'rows' => string '1' (length=1)
'Extra' => string 'Using where' (length=11)
from yii2-debug.
Then it's a bug...
from yii2-debug.
Related Issues (20)
- Please rewrite comments HOT 4
- Store data in a cache HOT 3
- User switching is not working when using custom User model id HOT 1
- Mailpanel should store message in request data HOT 1
- Feature: Show repeating DB calls from the same function (regardless of the parameters) HOT 8
- User switch not working if User model has JSON/Array column HOT 2
- Don't use table-danger to indicate excessive queries HOT 3
- DB summary view uses $criticalQueryThreshold directly instead of checking via isQueryCountCritical() method HOT 2
- Mail panel broken for Symfonimailer HOT 1
- List of queries in debug panel is empty when Connection::enableProfiling is false
- Display transaction begin/end in debug panel database queries list
- DbPanel::excessiveCallerThreshold should be disabled by default
- Object of class Symfony\Component\Mime\Header\Headers could not be converted to string HOT 2
- update irc link
- update github folder link
- update docs folder links
- Switching user back to admin user is not possible when using access rules
- update src folder links
- update root folder links
- Generating a url with a trailing slash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-debug.