Timeout expired

  • Hi,

    I have a DB with some tables conteints 10 000 000 records (more or less) each one. When I try to execute some queries, "Timeout expired" errors occurs. For Example:

    A query Insert From:  INSERT INTO R713_SUM  (CLIENT, MONTHYEAR, VAL)

    SELECT     CLIENT, CAST(MONTH(DATE) AS VARCHAR(2)) + '/' + CAST(YEAR(DATE) AS CHAR(4)) AS MONTHYEAR, SUM(VAL) AS VALT

    FROM         R713

    Table R713 conteins 8500000 records.

    Can you help me?

    Thanks  

    Mairim 

  • You're inserting every record into the R713_SUM table.  Is this what you want to do?  This could take a while as the transaction log is mostly likely growing during this large insert.  If so, then I would use DTS/Bulk Insert.

    Check your query timeout under Connections.  Is it set to the default of 0 for unlimited, or another value.

    Evaluate the purpose of this table.  If it is used for the MonthYear combination, then I would not even bother with the table and just create the MonthYear combination during my "Select" statement.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply