<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>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.]</DIV>
<DIV> </DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>Do you find that to be true? Do you have a simpler way around it than keeping a separate index of the applicable nodes?<BR> </DIV>
<P><FONT color=#ff007f size=4 face="bookman old style, new york, times, serif"><EM><STRONG>Nancy</STRONG></EM></FONT></P>
<P> </P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: Courier New, monaco, monospace, sans-serif; FONT-SIZE: 10pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Larry Garfield <larry@garfieldtech.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> development@drupal.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sun, January 23, 2011 7:41:34 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [development] Drupal 7 Entities - view random node<BR></FONT><BR>I did that all the time in Drupal 6 using Views. It's dead simple. (Order <BR>random limit 1, done.) I haven't tried doing it in Drupal 7, but I'm sure the <BR>same method still works.<BR><BR>--Larry Garfield<BR><BR>On Sunday, January 23, 2011 1:33:34 pm Blaine Lang wrote:<BR>> I have a need for a block that will display a random quote. Node type =<BR>> 'random_quote' and only 1 random record should be displayed<BR></DIV></DIV></div></body></html>