The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.

How to end an endlessly running query in Vertica?

I put a query to create a table in Vertica. But it seems that the query is taking more time to execute when compared to the average run time. It tried to stop the query using the cross button available in the background processes tab, but unfortunately it didn't stop the query. Can you please help in stopping it?

Comments

  • Hi, Closing the session may help to stop the query, you may try. dbadmin=> select session_id from sessions; session_id ---------------------------------- localhost.localdoma-6910:0x44294 select close_session('localhost.localdoma-13354:0xbeab');
  • I've had queries run on and stopping the queries via normal channels (SPSS or Toad Data Analyst) has no effect.  At first I thought it was the problem of the application, but have been searching and after seeing this wonder if it could be a problem with Vertica.  I am using vertica driver vertica-jdk5-6.1.2-0.jar

    When I kill SPSS I lose any unsaved streams.  Toad at least makes backups.  Killing the session is not my first choice.  The queries might be run under low memory conditions on my PC, but after I kill the process and restart I usually have no problem running them.

  • INTERRUPT_STATEMENT

    Syntax
    INTERRUPT_STATEMENT( 'session_id ', statement_id )
  • The Vertica Management console can kill queries as well.

  • INTERRUPT_STATEMENT is the best option, you can select which queries you want to stop.

    Did, you try to find out why your queries are blocked.

  • The management console can also kill a specific query. On the far right is the cancel query. See attached screen!cancel_query.png

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.