ข้ามไปที่เนื้อหาหลัก

2. ใช้ Select ซ้อน Select ให้ฉลาด ๆ ในบางเคส ยกตัวอย่างเช่น

  select f1,f2,f3  from my_table where
          (f1,f2) = (select max(f1),max(f2) from my_table)
      เร็วกว่า
     select f1,f2,f3  from my_table where
          f1 = (select max(f1) from my_table)
          and f2 = (select max(f2) from my_table)
     ฟันธง 

ความคิดเห็น

แสดงความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

script reindex all table

script reindex all table