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

From: Benedict Holland <benedict(dot)m(dot)holland(at)gmail(dot)com>
To: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
Cc: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>, Rob Sargent <robjsargent(at)gmail(dot)com>, Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Re: How long does iteration over 4-5 million rows usually take?
Date: 2022-04-02 14:34:34
Message-ID: CAD+mzozmywUViFppKBixdD-iTndVDKsDZndq9fvG9=WWOf0x5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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

On Sat, Apr 2, 2022, 10:16 AM Shaozhong SHI <shishaozhong(at)gmail(dot)com> wrote:

> Thanks, Karsten,
>
> I would like the information to work planning purpose.
>
> Regards,
>
> David
>
> On Sat, 2 Apr 2022 at 14:47, Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
> wrote:
>
>> > > On Apr 1, 2022, at 10:18 PM, Ron <ronljohnsonjr(at)gmail(dot)com> wrote:
>> > >
>> > >  On 4/1/22 20: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.
>> > >>
>> > >> How long does iteration over 4-5 million rows usually take?
>> >
>> > 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
>>
>>
>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Midgley 2022-04-02 16:38:41 Re: How long does iteration over 4-5 million rows usually take?
Previous Message Shaozhong SHI 2022-04-02 14:16:14 Re: Re: How long does iteration over 4-5 million rows usually take?

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Midgley 2022-04-02 16:38:41 Re: How long does iteration over 4-5 million rows usually take?
Previous Message Shaozhong SHI 2022-04-02 14:16:14 Re: Re: How long does iteration over 4-5 million rows usually take?