
phillip at communitybandwidth
Jul 17, 2008, 8:51 AM
Post #7 of 7
(276 views)
Permalink
|
|
Re: Generating a list of stories that don't have any keywords
[In reply to]
|
|
On 16-Jul-08, at 3:39 PM, John Greene wrote: > > David E. Wheeler wrote: >> On Jul 16, 2008, at 11:11, John Greene wrote: >> >>> perl -MBric::Biz::Asset::Business::Story -e 'foreach >>> $story(Bric::Biz::Asset::Business::Story->list()){print $story- >>> >get_title() . "\n" if scalar @{$story->get_keywords()} < 1}' >>> >>list.txt >> >> As long as you don't have a lot of stories, that's fine. But if you >> have 1000s, it will be pretty slow, I should think. That will >> execute a *lot* of queries (one for all stories, then one to get >> keywords for each story). >> >> Best, >> >> David > > This is correct; it's only good for a one-off list. I ran it on an > instance with 3247 stories, and it took aproximately 15 seconds to > complete. I wouldn't put such code in a template. ;) Seemed to work for a one-time, story-type limited, use within a template. :-) -- Phillip Smith, Simplifier of Technology Community Bandwidth http://www.communitybandwidth.ca
|