- COPYRIGHT & LICENSE
Pg::Explain - Object approach at reading explain analyze output
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)' ); ...
Returns original source (text version) of explain.
Returns filtered source explain.
Currently there are only two filters:
remove quotes added by pgAdmin3
remove + character at the end of line, added by default psql config.
Takes one of (only one!) (source, source_file) parameters, and either parses it from given source, or first reads given file.
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 checks which parser to use (text, json, xml, yaml), runs appropriate function, and stores top level node in $self->top_node.
Helper function to read source from file.
Returns parsed plan back as plain text format (regenerated from in-memory structure).
This is mostly useful for (future at the moment) anonymizations.
Used to remove all individual values from the explain, while still retaining all values that are needed to see what's wrong.
hubert depesz lubaczewski,
<depesz at depesz.com>
Please report any bugs or feature requests to
depesz at depesz.com.
You can find documentation for this module with the perldoc command.
Copyright 2008-2015 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.