Re: Delphi 8 and ado.net

From: Mike Swaim (mpswaim_at_mdanderson.org)
Date: 03/03/04


Date: Wed, 3 Mar 2004 15:10:24 -0600

Jimmy [Used-Disks] wrote:
>> "I want to do a join between table a and table b."
>>
>> "No. You want to do a select on a and a select on b, and create a
>> relationship in your dataset."
>
> That's a faster way to do it as far as the DB is concerned. Join's
> take more time.
  Nope. If I don't do a join, then I have to do something like

1)Select rows from A.
2)Inspect the result set to get the rows I need from B
3a)Select them using an "in" clause
or
3b)Do a bunch of singleton selects.

  Either 3a or 3b will take much longer than the join.

Now, I could just suck down table B, but that'd take ~10 minutes at 100%
CPU, which isn't a good solution, either.

>> "I'm using B as a lookup table, and it has over a million rows. My
>> final result set will have on the order of 20 entries. Why am I
>> doing this?"
>
> So narrow your select statement. Or - do a join! What's stopping you?
  Nothing's preventing me, I'm complaining that their vision of how things
should be done has some blind spots.
(I'm also annoyed that the DataAdapter Wizard can't handle joins. It'd also
be nice if the compiler would verify my SQL like when I was doing VC++, so
if the database changes, I know about it at build time, not when I run the
app and it abends, but that's not going to happen.)

--
Mike Swaim swaim@hal-pc.org at home | Quote: "Boingie"^4 Y,W & D
MD Anderson Dept. of Biostatistics & Applied Mathmatics
mpswaim@mdanderson.org or mswaim@odin.mdacc.tmc.edu at work
Disclaimer: Yeah, like I speak for MD Anderson.


Relevant Pages

  • Re: D8 manuals - RIP ?
    ... Jimmy [Used-Disks] wrote: ... Nobody else can do what we did. ... like I speak for MD Anderson. ...
    (borland.public.delphi.non-technical)
  • Re: Service Pack for Delphi 7
    ... Jimmy [Used-Disks] wrote: ... Rudy Velthuis (TeamB) ... - Moses Hadas ...
    (borland.public.delphi.non-technical)
  • Re: Borland Layoffs?
    ... Jimmy [Used-Disks] wrote: ... Rudy Velthuis (TeamB) ...
    (borland.public.delphi.non-technical)
  • Re: Anderson
    ... fitted to their bats so that they can reach the ball when ... Jimmy "the wide" Anderson comes on to bowl!" ...
    (uk.sport.cricket)
  • Re: Anderson
    ... fitted to their bats so that they can reach the ball when ... Jimmy "the wide" Anderson comes on to bowl!" ... I am half tempted to put a fiver on a five-fer for Anderson having ...
    (uk.sport.cricket)