1DBIx::Class::Helper::ReUssuelrtSCeotn:t:rEixbpultaeDidBnI(Px3e:)r:lClDaoscsu:m:eHnetlapteiro:n:ResultSet::Explain(3)
2
3
4

NAME

6       DBIx::Class::Helper::ResultSet::Explain - Get query plan for a
7       ResultSet
8

SYNOPSIS

10       This module mostly makes sense to be used without setting as a
11       component:
12
13        use Devel::Dwarn;
14        Dwarn DBIx::Class::ResultSet::Explain::explain($rs)
15
16       But as usual, if you prefer to use it as a component here's how:
17
18        package MyApp::Schema::ResultSet::Foo;
19
20        __PACKAGE__->load_components(qw{Helper::ResultSet::Explain});
21
22        ...
23
24        1;
25
26       And then in a script or something:
27
28        use Devel::Dwarn;
29        Dwarn $rs->explain;
30

DESCRIPTION

32       This is just a handy little tool that gives you the query plan for a
33       given ResultSet.  The output is in no way normalized, so just treat it
34       as a debug tool or something.  The only supported DB's are those listed
35       below.  Have fun!
36
37       See "NOTE" in DBIx::Class::Helper::ResultSet for a nice way to apply it
38       to your entire schema.
39

EXAMPLE OUTPUT FROM SUPPORTED DB's

41   SQlite
42        [
43          [
44            0,
45            "Init",
46            0,
47            10,
48            0,
49            "",
50            "00",
51            undef,
52          ],
53          [
54            1,
55            "OpenRead",
56            0,
57            3,
58            0,
59            4,
60            "00",
61            undef,
62          ],
63          [
64            2,
65            "Rewind",
66            0,
67            9,
68            0,
69            "",
70            "00",
71            undef,
72          ],
73          [
74            3,
75            "Rowid",
76            0,
77            1,
78            0,
79            "",
80            "00",
81            undef,
82          ],
83          [
84            4,
85            "Column",
86            0,
87            1,
88            2,
89            "",
90            "00",
91            undef,
92          ],
93          [
94            5,
95            "Column",
96            0,
97            2,
98            3,
99            "",
100            "00",
101            undef,
102          ],
103          [
104            6,
105            "Column",
106            0,
107            3,
108            4,
109            "",
110            "00",
111            undef,
112          ],
113          [
114            7,
115            "ResultRow",
116            1,
117            4,
118            0,
119            "",
120            "00",
121            undef,
122          ],
123          [
124            8,
125            "Next",
126            0,
127            3,
128            0,
129            "",
130            "01",
131            undef,
132          ],
133          [
134            9,
135            "Halt",
136            0,
137            0,
138            0,
139            "",
140            "00",
141            undef,
142          ],
143          [
144            10,
145            "Transaction",
146            0,
147            0,
148            17,
149            0,
150            "01",
151            undef,
152          ],
153          [
154            11,
155            "Goto",
156            0,
157            1,
158            0,
159            "",
160            "00",
161            undef,
162          ],
163        ]
164
165   Pg
166        [
167          [
168            "Seq Scan on \"Gnarly\" me  (cost=0.00..16.20 rows=620 width=100) (actual time=0.002..0.002 rows=0 loops=1)",
169          ],
170          [
171            "Planning time: 0.182 ms",
172          ],
173          [
174            "Execution time: 0.037 ms",
175          ],
176        ]
177
178   mysql
179        [
180          [
181            1,
182            "SIMPLE",
183            "me",
184            "ALL",
185            undef,
186            undef,
187            undef,
188            undef,
189            1,
190            100,
191            "",
192          ],
193        ]
194

AUTHOR

196       Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
197
199       This software is copyright (c) 2020 by Arthur Axel "fREW" Schmidt.
200
201       This is free software; you can redistribute it and/or modify it under
202       the same terms as the Perl 5 programming language system itself.
203
204
205
206perl v5.34.0                      202D2B-I0x1:-:2C1lass::Helper::ResultSet::Explain(3)
Impressum