query execution time

From: preetika tyagi <preetikatyagi(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: query execution time
Date: 2011-03-21 05:12:37
Message-ID: AANLkTi=hN+GMGRLCzqzTvu+LWUcaQ4HFikzuaPwa4z80@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-students

Hi,

I am wondering if someone can help me understand the following query
execution behavior:

I have two similar tables and table2 consists of 5000000 records.

Query: INSERT INTO table1 SELECT * FROM table2.
Execution Time: A ms.

Query: INSERT INTO table1 SELECT * FROM table2.
Execution Time: B ms.

Sometimes B >> A (B is very larger than A). Both queries are same and run
twice. What could be the reason that the same query is taking very long
sometime?

Thanks a lot!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adarsh Sharma 2011-03-21 06:13:57 Doubt in Backup
Previous Message Selena Deckelmann 2011-03-21 05:09:17 Re: query execution time

Browse pgsql-students by date

  From Date Subject
Next Message Vibhor Kumar 2011-03-21 09:48:54 Re: query execution time
Previous Message Selena Deckelmann 2011-03-21 05:09:17 Re: query execution time