top of page

[SQLite] หลีกเลี่ยงการใช้ IN เพราะมันช้า

  • Writer: Aek Saekhow
    Aek Saekhow
  • Apr 28, 2018
  • 1 min read

ข้อมูล 2 ตัวใช้เวลา 23ms

ข้อมูล 2 ตัวใช้เวลา 23ms

ข้อมูล 3 ตัวใช้เวลา 8528ms

ข้อมูล 3 ตัวใช้เวลา 8528ms

จากภาพด้านบนจะเห็นว่ายิ่ง array มีข้อมูลเยอะ ระยะเวลาในการประมวลผลยิ่งใช้มากขึ้น คล้ายว่าแต่ละ record จะนำ InspectionGroupId มาลูปเช็คว่ามีค่าใน array นั้น

Comments


Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page