Re: Stolen Ideas

[prev] [thread] [next] [Date index for 2004/08/10]

From: Tony Bowden
Subject: Re: Stolen Ideas
Date: 23:16 on 10 Aug 2004
On Tue, Aug 10, 2004 at 06:57:18PM -0400, Perrin Harkins wrote:
> I do something similar by overriding retrieve, and there's one on the
> wiki that uses triggers.  I think these solutions are okay, but one of
> them should be built in.

Syntax suggestions welcome :)

> I realized that my sample case, where search is fast but fetching
> objects is slow, was an anomaly.  For most people, search is the slow
> part.

How would the results be cached? 

> > > $cd->delete_from_tracks( title => 'Shake It Up' );
> >   $cd->tracks(title => 'Shake It Up')->delete_all;
> That does a select and then a delete for each row returned.  

So would $cd->delete_from_tracks( title => 'Shake It Up' );

It has to if it is going to honour triggers, cascades etc.

> Which brings up another major feature request:
> - More efficient SQL for Class->delete() and
> Class->search()->delete_all().  Performance matters a lot to most users.

I don't really see how this is possible. There could be something which
shortcuts the fetch & delete cycle, if we're absolutely certain that
there shouldn't be any side effects, but I'm not sure we can know that
in the general case.

A mult-row delete at the database layer isn't necessarily fast either if
there are triggers and constraints and the like. Issuing 100 delete
calls rather than 1 isn't necessarily a bottleneck in this case.

Perhaps a Class::DBI::Plugin::FastDelete that you can explicitly use
when you know what you're doing is safe?

> And while I'm at it, support for multi-column foreign keys.  I hand-code
> these at the moment.

The best way to make me write this is to make me have to work with a
database that has them. Then I'll get pissed off enough. At the minute I
can avoid that, so it's not an itch I need to scratch. 

I'll certainly accept patches for it though.

Tony

(message missing)

Stolen Ideas
Tony Bowden 18:58 on 10 Aug 2004

Re: Stolen Ideas
ed-cdbi 19:03 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 19:06 on 10 Aug 2004

Re: Stolen Ideas
ed-cdbi 19:08 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 19:11 on 10 Aug 2004

Re: Stolen Ideas
ed-cdbi 19:19 on 10 Aug 2004

RE: Stolen Ideas
Thomas, Mark - BLS CTR 19:11 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 19:27 on 10 Aug 2004

Re: Stolen Ideas
Nelson C. T. Ferraz 15:14 on 12 Aug 2004

Re: Stolen Ideas
Scott McWhirter 19:18 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 19:28 on 10 Aug 2004

Re: Stolen Ideas
Scott McWhirter 20:42 on 10 Aug 2004

Re: Stolen Ideas
Perrin Harkins 21:08 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 21:33 on 10 Aug 2004

Re: Stolen Ideas
Scott McWhirter 22:58 on 10 Aug 2004

Re: Stolen Ideas
Perrin Harkins 23:23 on 10 Aug 2004

Re: Stolen Ideas
Gregory P. Smith 19:55 on 10 Aug 2004

Re: Stolen Ideas
Perrin Harkins 20:02 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 21:47 on 10 Aug 2004

Re: Stolen Ideas
Perrin Harkins 22:23 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 22:37 on 10 Aug 2004

Re: Stolen Ideas
Perrin Harkins 22:57 on 10 Aug 2004

Re: Stolen Ideas
Yuval Kogman 15:39 on 11 Aug 2004

Re: Stolen Ideas
Tony Bowden 22:02 on 10 Aug 2004

Re: Stolen Ideas
ed-cdbi 22:11 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 22:25 on 10 Aug 2004

Re: Stolen Ideas
Tim Bunce 08:53 on 24 Aug 2004

Re: Stolen Ideas
Perrin Harkins 22:16 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 22:42 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 22:16 on 10 Aug 2004

Re: Stolen Ideas
Tony Bowden 23:18 on 10 Aug 2004

Re: Stolen Ideas
Scott McWhirter 23:48 on 10 Aug 2004

Re: Stolen Ideas
Perrin Harkins 00:22 on 11 Aug 2004

Re: Stolen Ideas
Perrin Harkins 03:45 on 11 Aug 2004

Re: Stolen Ideas
Tony Bowden 08:36 on 11 Aug 2004

Re: Stolen Ideas
Aaron Trevena 19:05 on 13 Aug 2004

Re: Stolen Ideas
Aaron Trevena 17:13 on 15 Aug 2004

Re: Stolen Ideas
Dan Friedman 04:47 on 11 Aug 2004

Re: Stolen Ideas
Tony Bowden 08:39 on 11 Aug 2004

Re: Stolen Ideas
Branislav Zahradnik 15:21 on 11 Aug 2004

RE: Stolen Ideas
Thomas, Mark - BLS CTR 19:13 on 13 Aug 2004

Re: Stolen Ideas
Tony Bowden 23:16 on 10 Aug 2004

Re: Stolen Ideas
Perrin Harkins 23:42 on 10 Aug 2004

Re: Stolen Ideas
Tim Bunce 08:48 on 24 Aug 2004

Re: Stolen Ideas
Tony Bowden 21:57 on 11 Aug 2004

Re: Stolen Ideas
Simon Cozens 09:03 on 24 Aug 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52