The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Pg::Explain::Hinter - Review Pg::Explain plans and return hints, if there are any

VERSION

Version 2.2

SYNOPSIS

Given Pg::Explain plan, it will look at its nodes, and suggest what can be improved, if anything.

    my $hinter = Pg::Explain::Hinter->new( $plan );
    if ( $hinter->any_hints ) {
        print Dumper( $hinter->hints );
    } else {
        print "There are no hints for this plan.\n";
    }

Hints are Pg::Explain::Hinter::Hint objects.

FUNCTIONS

new

Object constructor.

plan

Accessor for plan inside hinter.

hints

Accessor for hints inside hinter.

any_hints

Returns 1 if there are any hints for provided plan, and undef if there are none.

calculate_hints

Main function checking if there are any things that could be hinted on.

check_hint_disk_sort

Check if given node matches criteria for DISK_SORT hint

check_hint_indexable_seqscan_simple

Check if given node matches criteria for INDEXABLE_SEQSCAN_SIMPLE hint

check_hint_indexable_seqscan_multi_equal_and

Check if given node matches criteria for INDEXABLE_SEQSCAN_MULTI_EQUAL_AND hint

AUTHOR

hubert depesz lubaczewski, <depesz at depesz.com>

BUGS

Please report any bugs or feature requests to depesz at depesz.com.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Pg::Explain::Node

COPYRIGHT & LICENSE

Copyright 2008-2021 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.