query execution time - Mailing list pgsql-students

From preetika tyagi
Subject query execution time
Date
Msg-id AANLkTi=FhaO5mX_YdqqsF1Yh0YNEHW8H1f0AUdpE0Fmo@mail.gmail.com
Whole thread Raw
Responses Re: query execution time  (Selena Deckelmann <selena@chesnok.com>)
foreign data wrappers  (Zheng Yang <zhengyang4k@gmail.com>)
List 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!

pgsql-students by date:

Previous
From: preetika tyagi
Date:
Subject: Slow INSERT as compared to UPDATE
Next
From: Selena Deckelmann
Date:
Subject: Re: query execution time