Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qg3NX-00EIY7-R5 for pgsql-general@arkaria.postgresql.org; Tue, 12 Sep 2023 13:24:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qg3NW-008pDn-M8 for pgsql-general@arkaria.postgresql.org; Tue, 12 Sep 2023 13:24:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qg3NV-008pDS-Nh for pgsql-general@lists.postgresql.org; Tue, 12 Sep 2023 13:24:30 +0000 Received: from resdmta-a1p-077741.sys.comcast.net ([2001:558:fd01:2bb4::e]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qg3NQ-004eu6-2o for pgsql-general@lists.postgresql.org; Tue, 12 Sep 2023 13:24:28 +0000 Received: from resomta-a1p-077058.sys.comcast.net ([96.103.145.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resdmta-a1p-077741.sys.comcast.net with ESMTP id g1z2qldZWoYNAg3NIqfO3G; Tue, 12 Sep 2023 13:24:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1694525056; bh=tTjj12Ff4PNJ7n7E7WQSGU75eBa+PRo1WNuQ0ayiqzA=; h=Received:Received:Date:From:To:Message-ID:Subject:MIME-Version: Content-Type:Xfinity-Spam-Result; b=fkqgEVqITeZKPaHyWg0xNrB6ejWNOweGFEIl98jOBtROKBzMSMNBh/llKavh94Dos BNCFV/DBRrLyEVycIwQ7y3darwLRQXfgOuk3RP6xiwPgpWWUIF6M7Svg1NXVUUgaf/ UhRuFvZ7UGdUGFOJLcFYa87WceoNMyAa5yT3UHvQnoNdlhae6oBnfti1+mpXninD5m oC2RZxmvWvy2IZrA3bywJ5uKCwcq0KVdMQsTceCdt5jdYJVTTPZ4wzLIVSzXGXZkc3 C8bWLYPhBdNi2Z8YB1tG3H6Z/Ziw4sqq7822leP0BmeLyU45Z5Ib/7jSToTwfU3vXn uQPtMGtY1nhXg== Received: from oxappp-asc-88o.email.comcast.net ([96.118.221.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resomta-a1p-077058.sys.comcast.net with ESMTPS id g3NGq72czPyxMg3NGq0lCc; Tue, 12 Sep 2023 13:24:15 +0000 Date: Tue, 12 Sep 2023 09:24:14 -0400 (EDT) From: DAVID ROTH To: Daniel Gustafsson , Matthias Apitz Cc: pgsql-general@lists.postgresql.org Message-ID: <1540456242.525885.1694525054393@connect.xfinity.com> In-Reply-To: <903B39F6-3530-4299-A0D5-19DCD8B0D8B5@yesql.se> References: <20230912121919.zo74rbdhflpgp2eq@hjp.at> <903B39F6-3530-4299-A0D5-19DCD8B0D8B5@yesql.se> Subject: Re: Is data import from Oracle table to Postgres table in Ora2pg consecutive or random? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev39 X-Originating-IP: 2601:191:8400:d2a0:25ed:d91c:d0cb:3dee X-Originating-Client: open-xchange-appsuite List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I have not tried this in a while but I think a SELECT with a "hint" will re= turn rows in the order of the index in the hint. This does NOT work for di= stributed queries. > On 09/12/2023 9:10 AM EDT Daniel Gustafsson wrote: >=20 > =20 > > On 12 Sep 2023, at 14:26, Matthias Apitz wrote: > >=20 > > El d=C3=ADa martes, septiembre 12, 2023 a las 02:19:19 +0200, Peter J. = Holzer escribi=C3=B3: > >=20 > >>> - Or can we add additional parameters to the ora2pg.conf file to cont= rol this > >>> process and ensure that the data is imported sequentially, following = the > >>> primary key from smallest to largest? > >=20 > > AFAIK, a simple SELECT in PostgreSQL without an ORDER BY will return th= e rows > > in random order. >=20 > It will return the rows in some order, without guarantees about randomnes= s or > asc/desc ordering. Any query which relies on ordering, whichever is want= ed, > should include an ORDER BY clause. >=20 > -- > Daniel Gustafsson