in php (for example) it's frequently nice to get the structure of a
table without any data, ie, pull a single row with each attribute's
value is null. I use the query (dual is a table of one row ala
Oracle):
select m.* from dual
left join mytable m on( false );
this works every time, but if mytable is big, then takes a long time.
needed to rewrite the query to:
select m.* from dual
left join (select * from mytable limit 1) m on( false );
this works as it should - pulls empty row but fast.
it seems to me that a full table scan should not be necessary if the
join condition is false.
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs