Pg::Explain - Object approach at reading explain analyze output
Version 0.08
Quick summary of what the module does.
Perhaps a little code snippet.
use Pg::Explain; my $explain = Pg::Explain->new('source_file' => 'some_file.out'); ... my $explain = Pg::Explain->new( 'source' => 'Seq Scan on tenk1 (cost=0.00..333.00 rows=10000 width=148)' ); ...
Attribute only for object creation (it is cleared in constructor, after data loading).
It is used to give filename to plan to be loaded.
Attribute which stores plan to be parsed. To be set while creating object.
Method provided by Moose. From it's perldoc:
This is a method which provides access to the current class's metaclass.
Moose-called function which handles:
checking if only one of (source, source_file) parameters to constructor has been given
This method returns the top node of parsed plan.
For example - in this plan:
QUERY PLAN -------------------------------------------------------------- Limit (cost=0.00..0.01 rows=1 width=4) -> Seq Scan on test (cost=0.00..14.00 rows=1000 width=4)
top_node is Pg::Explain::Node element with type set to 'Limit'.
Generally every output of plans should start with ->top_node(), and descend recursively in it, using subplans(), initplans() and sub_nodes() methods.
Internally (from ->BUILD()) called function which parses provided source, and generated appropriate Pg::Explain::Node objects.
Top level node is stored as $self->top_node.
hubert depesz lubaczewski, <depesz at depesz.com>
<depesz at depesz.com>
Please report any bugs or feature requests to depesz at depesz.com.
depesz at depesz.com
You can find documentation for this module with the perldoc command.
perldoc Pg::Explain
Copyright 2008 hubert depesz lubaczewski, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Pg::Explain, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pg::Explain
CPAN shell
perl -MCPAN -e shell install Pg::Explain
For more information on module installation, please visit the detailed CPAN module installation guide.