Skip to content

handle explain like sqlite #1405

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

handle explain like sqlite #1405

wants to merge 5 commits into from

Conversation

TcMits
Copy link
Contributor

@TcMits TcMits commented Apr 25, 2025

related #1392

limbo:

limbo> CREATE TABLE dynamic_rodrigues (bountiful_beyerarnesen INTEGER,stunning_workers REAL);
limbo> EXPLAIN SELECT * FROM dynamic_rodrigues; EXPLAIN SELECT * FROM dynamic_rodrigues;
addr  opcode             p1    p2    p3    p4             p5  comment
----  -----------------  ----  ----  ----  -------------  --  -------
0     Init               0     9     0                    0   Start at 9
1     OpenRead           0     2     0                    0   table=dynamic_rodrigues, root=2
2     Rewind             0     8     0                    0   Rewind dynamic_rodrigues
3       Column           0     0     1                    0   r[1]=dynamic_rodrigues.bountiful_beyerarnesen
4       Column           0     1     2                    0   r[2]=dynamic_rodrigues.stunning_workers
5       RealAffinity     2     0     0                    0
6       ResultRow        1     2     0                    0   output=r[1..2]
7     Next               0     3     0                    0
8     Halt               0     0     0                    0
9     Transaction        0     0     0                    0   write=false
10    Goto               0     1     0                    0

sqlite:

sqlite> CREATE TABLE dynamic_rodrigues (bountiful_beyerarnesen INTEGER,stunning_workers REAL);
sqlite> EXPLAIN SELECT * FROM dynamic_rodrigues; EXPLAIN SELECT * FROM dynamic_rodrigues;
addr  opcode         p1    p2    p3    p4             p5  comment
----  -------------  ----  ----  ----  -------------  --  -------------
0     Init           0     10    0                    0   Start at 10
1     OpenRead       0     2     0     2              0   root=2 iDb=0; dynamic_rodrigues
2     Explain        2     0     0     SCAN TABLE dynamic_rodrigues  0
3     Rewind         0     9     0                    0
4       Column         0     0     1                    0   r[1]=dynamic_rodrigues.bountiful_beyerarnesen
5       Column         0     1     2                    0   r[2]=dynamic_rodrigues.stunning_workers
6       RealAffinity   2     0     0                    0
7       ResultRow      1     2     0                    0   output=r[1..2]
8     Next           0     4     0                    1
9     Halt           0     0     0                    0
10    Transaction    0     0     1     0              1   usesStmtJournal=0
11    Goto           0     1     0                    0
addr  opcode         p1    p2    p3    p4             p5  comment
----  -------------  ----  ----  ----  -------------  --  -------------
0     Init           0     10    0                    0   Start at 10
1     OpenRead       0     2     0     2              0   root=2 iDb=0; dynamic_rodrigues
2     Explain        2     0     0     SCAN TABLE dynamic_rodrigues  0
3     Rewind         0     9     0                    0
4       Column         0     0     1                    0   r[1]=dynamic_rodrigues.bountiful_beyerarnesen
5       Column         0     1     2                    0   r[2]=dynamic_rodrigues.stunning_workers
6       RealAffinity   2     0     0                    0
7       ResultRow      1     2     0                    0   output=r[1..2]
8     Next           0     4     0                    1
9     Halt           0     0     0                    0
10    Transaction    0     0     1     0              1   usesStmtJournal=0
11    Goto           0     1     0                    0

because sqlite use step to run

@TcMits TcMits marked this pull request as draft April 25, 2025 11:49
@TcMits TcMits marked this pull request as ready for review April 25, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant