in reply to Topics in Perl Programming: Table-Mutation Tolerant Database Fetches with DBI
When database fields are removed or switched in position, I call these destructive or positional field mutations. It is clear that Perl code based on array ref fetches will break in the face of such table mutations. On the other hand, hash ref fetches will not fail in this case.First, switching field positions in a table is usually not a good idea, but should only be a problem when you 'select *' instead of selecting explicit fields. Some say that you should always explicitly select fields, and for efficiency, you should only be selecting the fields that you need anyway. I think selecting into a hashref is still slow, so I'd only do that if speed was not an issue.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Topics in Perl Programming: Table-Mutation Tolerant Database Fetches with DBI
by princepawn (Parson) on Nov 28, 2000 at 23:53 UTC | |
by swiftone (Curate) on Nov 28, 2000 at 23:54 UTC | |
by Caillte (Friar) on Nov 29, 2000 at 14:44 UTC | |
by extremely (Priest) on Nov 29, 2000 at 15:53 UTC |
In Section
Seekers of Perl Wisdom