pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: DAVID ROTH <adaptron@comcast.net>
To: Daniel Gustafsson <daniel@yesql.se>
To: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Is data import from Oracle table to Postgres table in Ora2pg consecutive or random?
Date: Tue, 12 Sep 2023 09:24:14 -0400 (EDT)
Message-ID: <1540456242.525885.1694525054393@connect.xfinity.com> (raw)
In-Reply-To: <903B39F6-3530-4299-A0D5-19DCD8B0D8B5@yesql.se>
References: <CAM2ukh+iP-bFOm=5YpZQka9uyZ6JHtmnYojPCvCD1Vavv5_kaA@mail.gmail.com>
	<20230912121919.zo74rbdhflpgp2eq@hjp.at>
	<ZQBY77SKarCfnhFM@pureos>
	<903B39F6-3530-4299-A0D5-19DCD8B0D8B5@yesql.se>

I have not tried this in a while but I think a SELECT with a "hint" will return rows in the order of the index in the hint.  This does NOT work for distributed queries.


> On 09/12/2023 9:10 AM EDT Daniel Gustafsson <daniel@yesql.se> wrote:
> 
>  
> > On 12 Sep 2023, at 14:26, Matthias Apitz <guru@unixarea.de> wrote:
> > 
> > El día martes, septiembre 12, 2023 a las 02:19:19 +0200, Peter J. Holzer escribió:
> > 
> >>> - Or can we add additional parameters to the ora2pg.conf file to control this
> >>> process and ensure that the data is imported sequentially, following the
> >>> primary key from smallest to largest?
> > 
> > AFAIK, a simple SELECT in PostgreSQL without an ORDER BY will return the rows
> > in random order.
> 
> It will return the rows in some order, without guarantees about randomness or
> asc/desc ordering.  Any query which relies on ordering, whichever is wanted,
> should include an ORDER BY clause.
> 
> --
> Daniel Gustafsson





view thread (6+ messages)

Message-ID: <1540456242.525885.1694525054393@connect.xfinity.com>
Permalink:  ../1540456242.525885.1694525054393@connect.xfinity.com/
Also on:    postgresql.org/message-id/1540456242.525885.1694525054393@connect.xfinity.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adaptron@comcast.net, daniel@yesql.se, guru@unixarea.de
  Subject: Re: Is data import from Oracle table to Postgres table in Ora2pg consecutive or random?
  In-Reply-To: <1540456242.525885.1694525054393@connect.xfinity.com>
  References: <CAM2ukh+iP-bFOm=5YpZQka9uyZ6JHtmnYojPCvCD1Vavv5_kaA@mail.gmail.com> <20230912121919.zo74rbdhflpgp2eq@hjp.at> <ZQBY77SKarCfnhFM@pureos> <903B39F6-3530-4299-A0D5-19DCD8B0D8B5@yesql.se> <1540456242.525885.1694525054393@connect.xfinity.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox