[yunqa.de] Re: Something like FieldByName

  • From: "Edwin Yip" <mindvisualizer@xxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 11 Jun 2008 09:46:21 +0800

Ralf, you r knowledgeable and yr support is really excellent. Many thx!

On Tue, Jun 10, 2008 at 10:39 PM, <info@xxxxxxxxxxxxxxxxxx> wrote:

> Ralf, you r knowledgeable and yr support is really excellent. Many thx!
>
> On 6/10/08, Delphi Inspiration <delphi@xxxxxxxx> wrote:
> > Edwin Yip wrote:
> >
> >>Thanks for your help, by reading your example I realized that the
> >> FieldByName or equivalent needs an additional loop,
> >
> > Same for Delphi's TDataSet.FieldByName. In addition to loops, it uses
> plenty
> > of subroutines also.
> >
> >>so concerning the performance
> >
> > Obviously, hard-coded column indexes will always be fastest.
> >
> >>I'll stick with stick with the "ColumnByIndex" things. :)
> >
> > If you calculate your column indexes once only for multiple queries, the
> > performance hit will be marginal and your code will still be readable.
> >
> > To combine advantages from both approaches, you might use hard-coded
> > constant column indexes for easy readability. For extra safety, you can
> > ASSERT() their values using sqlite3_column_index() when running in debug
> > mode.
> >
> > Ralf
> >
> > _______________________________________________
> > Delphi Inspiration mailing list
> > yunqa@xxxxxxxxxxxxx
> > //www.freelists.org/list/yunqa
> >
> >
> >
> >
>
>
> --
> Edwin Yip
>
> Best Regards,
> http://www.InnovationGear.com
> MindVisualizer -- Rapid Visual Mind Mapping Software
>



-- 
Edwin Yip

Best Regards,
http://www.InnovationGear.com
MindVisualizer -- Rapid Visual Mind Mapping Software

Other related posts: