How do i find remaining time for a long running query?

Highlighted
Level 3 Adventurer

How do i find remaining time for a long running query?

Hi All,

 

Is there any way by which i can find, how much time a query will take to complete it's execution. 

 

Like In Oracle, we have v$session_longops. Is there any catalogue view in EDB Postgres?

 

This is in regards to a create index statement that is running for five hours on a table of size 300GB  and i want to know how much more time it will take?

 

Thank you!

Archived Discussions


Effective March 31st, we will no longer engage on PostgresRocks.


How to engage with us further?


  • Thought Leadership: EDB Blogs

  • Tips and Tricks: Postgres Tutorials

  • Customer Support: Create a Case Please note: Only customers with an active EDB support subscription and support portal authorization can create support ticket

  • Engage on Stackoverflow While engaging on Stackoverflow tag the question with EDB or EnterpriseDB.

2 REPLIES 2
Highlighted
Level 3 Adventurer

Re: How do i find remaining time for a long running query?

You can check any query expected runtime through explain command. However create index will take considerable time based on its datatype, and it has to insert the entire column data in that index. I hope you have used concurrent option to create the index, to avoid explicit locking.

Highlighted
Level 3 Adventurer

Re: How do i find remaining time for a long running query?

Hi @ameenabbas,

 

Thank you for the update.

We are doing a backup and restore using pg_dump and psql.Create index is taking time during restoration.

Here, the table size on which the create index is running is around 300GB and so i need to find how much time more it will take to complete(i.e the remaining time)

 

Thanks!

 

 

© 2019 EnterpriseDB Corporation. All rights reserved.   |   Privacy Policy   |  Terms of Use   |   Trademarks