{
    "mode": "man",
    "parameter": "DBIPROF",
    "section": "1p",
    "url": "https://www.chedong.com/phpMan.php/man/DBIPROF/1p/json",
    "generated": "2026-06-15T14:38:08Z",
    "synopsis": "See a report of the ten queries with the longest total runtime in the profile dump file\nprof1.out:\ndbiprof prof1.out\nSee the top 10 most frequently run queries in the profile file dbi.prof (the default):\ndbiprof --sort count\nSee the same report with 15 entries:\ndbiprof --sort count --number 15",
    "sections": {
        "NAME": {
            "content": "dbiprof - command-line client for DBI::ProfileData\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "See a report of the ten queries with the longest total runtime in the profile dump file\nprof1.out:\n\ndbiprof prof1.out\n\nSee the top 10 most frequently run queries in the profile file dbi.prof (the default):\n\ndbiprof --sort count\n\nSee the same report with 15 entries:\n\ndbiprof --sort count --number 15\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This tool is a command-line client for the DBI::ProfileData.  It allows you to analyze the\nprofile data file produced by DBI::ProfileDumper and produce various useful reports.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "This program accepts the following options:\n\n--number N\nProduce this many items in the report.  Defaults to 10.  If set to \"all\" then all results\nare shown.\n\n--sort field\nSort results by the given field. Sorting by multiple fields isn't currently supported\n(patches welcome).  The available sort fields are:\n\ntotal\nSorts by total time run time across all runs.  This is the default sort.\n\nlongest\nSorts by the longest single run.\n\ncount\nSorts by total number of runs.\n\nfirst\nSorts by the time taken in the first run.\n\nshortest\nSorts by the shortest single run.\n\nkey1\nSorts by the value of the first element in the Path, which should be numeric.  You\ncan also sort by \"key2\" and \"key3\".\n",
            "subsections": [
                {
                    "name": "--reverse",
                    "content": "Reverses the selected sort.  For example, to see a report of the shortest overall time:\n\ndbiprof --sort total --reverse\n\n--match keyN=value\nConsider only items where the specified key matches the given value.  Keys are numbered\nfrom 1.  For example, let's say you used a DBI::Profile Path of:\n\n[ DBIprofileStatement, DBIprofileMethodname ]\n\nAnd called dbiprof as in:\n\ndbiprof --match key2=execute\n\nYour report would only show execute queries, leaving out prepares, fetches, etc.\n\nIf the value given starts and ends with slashes (\"/\") then it will be treated as a\nregular expression.  For example, to only include SELECT queries where key1 is the\nstatement:\n\ndbiprof --match key1=/^SELECT/\n\nBy default the match expression is matched case-insensitively, but this can be changed\nwith the --case-sensitive option.\n\n--exclude keyN=value\nRemove items for where the specified key matches the given value.  For example, to\nexclude all prepare entries where key2 is the method name:\n\ndbiprof --exclude key2=prepare\n\nLike \"--match\", If the value given starts and ends with slashes (\"/\") then it will be\ntreated as a regular expression.  For example, to exclude UPDATE queries where key1 is\nthe statement:\n\ndbiprof --match key1=/^UPDATE/\n\nBy default the exclude expression is matched case-insensitively, but this can be changed\nwith the --case-sensitive option.\n",
                    "long": "--reverse"
                },
                {
                    "name": "--case-sensitive",
                    "content": "Using this option causes --match and --exclude to work case-sensitively.  Defaults to\noff.\n",
                    "long": "--case-sensitive"
                },
                {
                    "name": "--delete",
                    "content": "Sets the \"DeleteFiles\" option to DBI::ProfileData which causes the files to be deleted\nafter reading. See DBI::ProfileData for more details.\n",
                    "long": "--delete"
                },
                {
                    "name": "--dumpnodes",
                    "content": "Print the list of nodes in the form of a perl data structure.  Use the \"-sort\" option if\nyou want the list sorted.\n",
                    "long": "--dumpnodes"
                },
                {
                    "name": "--version",
                    "content": "Print the dbiprof version number and exit.\n",
                    "long": "--version"
                }
            ]
        },
        "AUTHOR": {
            "content": "Sam Tregar <sam@tregar.com>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "Copyright (C) 2002 Sam Tregar\n\nThis program is free software; you can redistribute it and/or modify it under the same terms\nas Perl 5 itself.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "DBI::ProfileDumper, DBI::Profile, DBI.\n\n\n\nperl v5.34.0                                 2022-02-06                                  DBIPROF(1p)",
            "subsections": []
        }
    },
    "summary": "dbiprof - command-line client for DBI::ProfileData",
    "flags": [
        {
            "flag": "",
            "long": "--reverse",
            "arg": null,
            "description": "Reverses the selected sort. For example, to see a report of the shortest overall time: dbiprof --sort total --reverse --match keyN=value Consider only items where the specified key matches the given value. Keys are numbered from 1. For example, let's say you used a DBI::Profile Path of: [ DBIprofileStatement, DBIprofileMethodname ] And called dbiprof as in: dbiprof --match key2=execute Your report would only show execute queries, leaving out prepares, fetches, etc. If the value given starts and ends with slashes (\"/\") then it will be treated as a regular expression. For example, to only include SELECT queries where key1 is the statement: dbiprof --match key1=/^SELECT/ By default the match expression is matched case-insensitively, but this can be changed with the --case-sensitive option. --exclude keyN=value Remove items for where the specified key matches the given value. For example, to exclude all prepare entries where key2 is the method name: dbiprof --exclude key2=prepare Like \"--match\", If the value given starts and ends with slashes (\"/\") then it will be treated as a regular expression. For example, to exclude UPDATE queries where key1 is the statement: dbiprof --match key1=/^UPDATE/ By default the exclude expression is matched case-insensitively, but this can be changed with the --case-sensitive option."
        },
        {
            "flag": "",
            "long": "--case-sensitive",
            "arg": null,
            "description": "Using this option causes --match and --exclude to work case-sensitively. Defaults to off."
        },
        {
            "flag": "",
            "long": "--delete",
            "arg": null,
            "description": "Sets the \"DeleteFiles\" option to DBI::ProfileData which causes the files to be deleted after reading. See DBI::ProfileData for more details."
        },
        {
            "flag": "",
            "long": "--dumpnodes",
            "arg": null,
            "description": "Print the list of nodes in the form of a perl data structure. Use the \"-sort\" option if you want the list sorted."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print the dbiprof version number and exit."
        }
    ],
    "examples": [],
    "see_also": []
}