[development] Drupal 7 Entities - view random node
nan wich
nan_wich at bellsouth.net
Mon Jan 24 00:53:58 UTC 2011
Larry, I am curious. Being that you are a database guru, this fits in with an
issue for my Quotes module, as does the original post. [BTW, Blaine, rather than
write you own, you might want to look at Quotes.]
One of the users who has an unusual number of quotes (~12K) says that ORDER
RANDOM LIMIT 1 is not very efficient and gets fairly slow at that size. There
are discussions elsewhere on the web to back up that assertion.
Do you find that to be true? Do you have a simpler way around it than keeping a
separate index of the applicable nodes?
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
________________________________
From: Larry Garfield <larry at garfieldtech.com>
To: development at drupal.org
Sent: Sun, January 23, 2011 7:41:34 PM
Subject: Re: [development] Drupal 7 Entities - view random node
I did that all the time in Drupal 6 using Views. It's dead simple. (Order
random limit 1, done.) I haven't tried doing it in Drupal 7, but I'm sure the
same method still works.
--Larry Garfield
On Sunday, January 23, 2011 1:33:34 pm Blaine Lang wrote:
> I have a need for a block that will display a random quote. Node type =
> 'random_quote' and only 1 random record should be displayed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110123/3a2ed1cf/attachment.html
More information about the development
mailing list