public inbox for [email protected]
help / color / mirror / Atom feedFrom: Benedict Holland <[email protected]>
To: Shaozhong SHI <[email protected]>
Cc: Karsten Hilbert <[email protected]>
Cc: Rob Sargent <[email protected]>
Cc: Ron <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Re: How long does iteration over 4-5 million rows usually take?
Date: Sat, 2 Apr 2022 10:34:34 -0400
Message-ID: <CAD+mzozmywUViFppKBixdD-iTndVDKsDZndq9fvG9=WWOf0x5A@mail.gmail.com> (raw)
In-Reply-To: <CA+i5JwaUOJ+r6H+3VfNaoZXTykAyhpy8q8j5JjHw-=_AWTtLfQ@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<trinity-3d817328-9ee8-4c97-a95c-99c034f30558-1648907215445@3c-app-gmx-bap24>
<CA+i5JwaUOJ+r6H+3VfNaoZXTykAyhpy8q8j5JjHw-=_AWTtLfQ@mail.gmail.com>
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 <[email protected]> wrote:
> Thanks, Karsten,
>
> I would like the information to work planning purpose.
>
> Regards,
>
> David
>
> On Sat, 2 Apr 2022 at 14:47, Karsten Hilbert <[email protected]>
> wrote:
>
>> > > On Apr 1, 2022, at 10:18 PM, Ron <[email protected]> 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
>>
>>
>>
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Re: How long does iteration over 4-5 million rows usually take?
In-Reply-To: <CAD+mzozmywUViFppKBixdD-iTndVDKsDZndq9fvG9=WWOf0x5A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox