Skip to content

Measure Execution Time with postgresql_query and postgresql_script #787

@optica-phoffmann

Description

@optica-phoffmann
SUMMARY

I want to be able to get the execution time of an sql query. I searched the docs of postgresql_query and postgresql_script. I looks like this feature is currently not available. I searched the issues in this repo but couldn't find any discussion about this.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME
  • postgresql_query
  • postgresql_script
ADDITIONAL INFORMATION

Ansible Task Example:

- name: Simple select query to acme db
  community.postgresql.postgresql_query:
    db: acme
    query: SELECT id FROM accounts
    measure_time: yes

Additional Return value

execution_time_ms: 7104.652

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions