A raise of hands please to the question.

How many of you have columns to identify Who and When a row was inserted and
updated?

I thought so :)

This is what I try keep from sending across the cable.  I am only trying to
point to the fact that when hitting the db is the second SLOWEST thing you
do you should be as efficient as possible when you do it.  What is the
slowest?  Moving that data back on the wire to the calling process.  

So less is actually more.  

I agree with what you are saying about Linq and ease of not having to update
objects and code due to changes but that is why we have those jobs right?  



.........................
Stephen Russell - 
Senior Visual Studio Developer, DBA

Memphis, TN
901.246-0159


> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Lee Gunn
> Sent: Tuesday, April 14, 2009 12:17 PM
> To: [email protected]
> Subject: [DotNetDevelopment] Re: gridview
> 
> This is a good topic actually...
> 
> In days gone past I allways used to use a field list and refrain from
> using *
> 
> Simply because this had been drilled into me as being the most
> performant way of selecting data (which it is of course as no lookup is
> required)
> 
> But, recently I've started using * again for use with mapping software
> (such as Linq to SQL for example). Its makes it easier to quickly add
> or remove a column from a database table and quickly update the Entity
> declaration. You dont have to then worry about all the custom stored
> procs etc which would now be broken and cause Linq to SQL to blow up as
> the proc using * will still return all the correct columns.
> 
> I think its the same old story...different techniques are required for
> different scenarios. If your app is heavily used and you need to
> squeeze every bit of juice out of your code then specifying a field
> list may reduce the SELECT by a fraction...but is that performance gain
> worth the hassel of extra development time to re-jig all other
> procedures...
> 
> Lee
> 
> -------
> 
> Latest Project:
> http://www.jiba-jaba.com
> - The home of public microblogging
> 
>   _____
> 
> From: [email protected] on behalf of Cerebrus
> Sent: Tue 14/04/2009 18:00
> To: DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
> Services,.NET Remoting
> Subject: [DotNetDevelopment] Re: gridview
> 
> 
> 
> 
> I agree with Joe... I would refrain from using a sweeping statement
> like that. And Stephen, what if I did need *all* the columns from a
> particular table? ;-)
> 
> On Apr 14, 9:15 pm, Joe Enos <[email protected]> wrote:
> > Of course, for all of the developers who have a data access layer
> that
> > converts table contents to objects, "select *" is just fine, since
> the
> > data layer probably requires this.  So "NEVER" is a bit strong, don't
> > you think?
> >
> > On Apr 14, 8:06 am, "Stephen Russell" <[email protected]> wrote:
> >
> >
> >
> > > For all of you developers please NEVER select "*"
> >
> > > Try :
> > > Select <FieldList> from MyTable
> >
> > > The least # of Columns out of your data source will ALWAYS be
> faster.  Isn't
> > > that what we strive for?
> >
> > > .........................
> > > Stephen Russell -
> > > Senior Visual Studio Developer, DBA
> >
> > > Memphis, TN
> > > 901.246-0159
> >
> 
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.287 / Virus Database: 270.11.57/2059 - Release Date:
> 04/14/09 14:52:00


Reply via email to