Inserting nothing takes a long time

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hennie7863

    #1

    Inserting nothing takes a long time

    Hi,
    I've a strange problem with a INSERT query. It's taking a long time to
    execute. The format is like this :

    INSERT INTO table1
    SELECT ..
    FROM table2

    Executing the SELECT .. FROM table2 is taking 30 seconds. The result
    is nothing: no records are selected.

    When i include the INSERT part it will take 12 hours to complete

    INSERT INTO table1
    SELECT ..
    FROM table2

    There's is an index on the table and when i delete it, it gives still
    the problem.

    Keh?

    Greetz,
    Hennie
  • B D Jensen

    #2
    Re: Inserting nothing takes a long time

    Hi!
    Is this a real problem? ;-)
    Nothing to insert...??

    Ok: what is the complete sql?
    Remember caching can cause effect when running statement more than
    once.

    What does "set SHOWPLAN_ALL ON..." tell you?
    What do you get when enabling:
    SET STATISTICS TIME ON
    SET STATISTICS IO ON
    /Bjorn

    Comment

    Working...