Re: Interview question

  • From: David Ramírez Reyes <dramirezr@xxxxxxxxx>
  • To: cicciuxdba@xxxxxxxxx
  • Date: Fri, 26 Apr 2013 11:47:12 -0500

The question is not well done, it's like asking what is best, add more disk
space or delete unused files from a filesystem?, you are asking about
comparison from apples to pears, removing the records will always be the
best option (if possible).
A better question would be what is the best way to have both values
separated (the one in both and the one only in A) from performance
perspective?, adding a flag?, partitioned table?, partitioned index?,
both?, materialized view?

Thanks

David Ramírez Reyes
Profesión: Padre de Familia



On 26 April 2013 10:10, Guillermo Alan Bort <cicciuxdba@xxxxxxxxx> wrote:

> Partitioning?
> Adding a column and flagging the rows is not the same as removing them. So
> this is a functional question. If the app supports the use of this column
> to filter the rows then you would be adding a fast full index scan to the
> execution of the queries (assuming they are written properly). However,
> removing them would have a big impact for a limited time and no execution
> plan would need to change. I would personally go with deleting the records,
> under the correct circumstances, of course.
>
> A deeper understanding of the relation between these tables and the reason
> behind the data duplication would be necessary.
>
> hth
>
> Alan.-
>
>
> On Fri, Apr 26, 2013 at 10:36 AM, <rajugaru.vij@xxxxxxxxx> wrote:
>
> > Again back with an interview question.
> > Table A has 400 million rows and table b has 1 million rows.
> >
> > I want to compare table A and Table B and find all the rows available in
> b
> > which are already available in A.
> >
> > want to remove all those which are available in B from A.
> >
> > What would be best option? Deleting them or adding a column and flagging
> > them?
> >
> > What's the better option performance wise?
> >
> > Thanks
> > Sent on my BlackBerryŽ from Vodafone--
> > //www.freelists.org/webpage/oracle-l
> >
> >
> >
>
> --
> //www.freelists.org/webpage/oracle-l
>
>
>

--
//www.freelists.org/webpage/oracle-l


Other related posts: