The sql can be predigest to:
select random() from a where random()<0.5;
\d a
       Table "public.a"
 Column |  Type   | Modifiers
--------+---------+-----------
 a      | integer |
This query can get about a half rows in the table 'a'.
When search a row, postgresql calcuate random() twice.



_________________________________________________________
Do You Yahoo!?
登記免費的 @yahoo.com 中文電子郵件 @ http://chinese.mail.yahoo.com
Get your free @yahoo.com address at http://chinese.mail.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to