Skip to Main Content
  • Questions
  • Avoid full-table scan when filtered by ora_rowscn

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Shiva.

Asked: April 12, 2018 - 5:55 pm UTC

Last updated: April 14, 2018 - 3:47 am UTC

Version: 11.2 & 12.1

Viewed 1000+ times

You Asked

Hello,

We have a need to extract data using "sqoop" on a bunch of tables. However, there is no column defined in those tables that store information like "update date or last modified date". We are thinking of using ora_rowscn as a filter. However, the query always goes a full table scan.

Is there a way to avoid full table scan and still extract the incremental data?

Thanks,

and Connor said...

Nope.

By default the ora_rowscn is a block level recording anyway (not row level) so you might/will get rows extracted that were not actually updated.

Our general recommendation to pick up deltas is using Goldengate as a full replication/extraction solution.

If that is not an option (ie, $$$), then you'll need to look at some metadata to track changed rows (either additional columns or similar).

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Shiva, April 13, 2018 - 7:51 pm UTC

Thanks for the response. Is indexing ora_rowscn in Oracle's backlog?
Connor McDonald
April 14, 2018 - 3:47 am UTC

Not to my knowledge.

You could log it here

https://community.oracle.com/community/database/database-ideas


More to Explore

Design

New to good database design? Check out Chris Saxon's full fundamentals class.