Subject: How long does iteration over 4-5 million rows usually take?

From: Shaozhong SHI <[email-masked]>
Date: Sat, 2 Apr 2022 02:34:26 +0100

I have a script running to iterate over 4-5 million rows.  It keeps showing
up in red in PgAdmin.  It remains active.

How long does iteration over 4-5 million rows usually take?

Regards,

David

---

From: Shaozhong SHI <[email-masked]>
Date: Sat, 2 Apr 2022 02:35:04 +0100

Regards,

David

---

From: Adrian Klaver <[email-masked]>
Date: Fri, 1 Apr 2022 18:47:42 -0700

On 4/1/22 18:34, Shaozhong SHI wrote:
> 
> I have a script running to iterate over 4-5 million rows.  It keeps 
> showing up in red in PgAdmin.  It remains active.
> 

Given that there is no real information provided in the problem 
description there is no chance for an answer more detailed then; as long 
as it takes.

-- 
Adrian Klaver
[email-masked]

---

From: Ron <[email-masked]>
Date: Fri, 1 Apr 2022 21:18:45 -0500

> How long does iteration over 4-5 million rows usually take?

What /*exactly*/ are you doing?

-- 
Angular momentum makes the world go 'round.

---

From: Rob Sargent <[email-masked]>
Date: Sat, 2 Apr 2022 09:21:00 -0400

> On Apr 1, 2022, at 10:18 PM, Ron <[email-masked]> wrote:
> 
>> I have a script running to iterate over 4-5 million rows.  It keeps showing up in red in PgAdmin.  It remains active.
>> 

4-5 million times as long as it takes to do one iteration ( if you’re doing it correctly)

---

From: Karsten Hilbert <[email-masked]>
Date: Sat, 2 Apr 2022 15:46:55 +0200

> 4-5 million times as long as it takes to do one iteration ( if you’re doing it correctly)

I may not take quite that long because setup/teardown times might not be needed for each iteration.

Best,
Karsten

---

From: Shaozhong SHI <[email-masked]>
Date: Sat, 2 Apr 2022 15:16:14 +0100

Thanks, Karsten,

I would like the information to work planning purpose.

Regards,

David

---

From: Benedict Holland <[email-masked]>
Date: Sat, 2 Apr 2022 10:34:34 -0400

For work planning, create a temporary table, copy from a generated data
set, and test it out. It really depends. Normally, you don't iterate in SQL
since rows are assumed to be independent. You think about SQL in terms of
sets and let application code handle the data transfers. It also really
depends on the size of your tables, indexing, joins, and more. Basically,
there isn't really an answer but it isnt hard to test.

Thanks,
Ben

---

From: Steve Midgley <[email-masked]>
Date: Sat, 2 Apr 2022 09:38:41 -0700

> How long does iteration over 4-5 million rows usually take?
Please share the SQL query, schema, and sample data. If you are using a
third party script with a db connector, then the answer is much harder to
answer.