📦 Stored Procedure เป็นวิธีการรวบรวมคำสั่ง SQL เพื่อกระทำกับข้อมูลในฐานข้อมูล ซึ่งจำเป็นมากสำหรับการพัฒนาระบบที่มีขนาดใหญ่ และมีการจัดเก็บข้อมูลเป็นจำนวนมาก มากในที่นี่อาจจะมีข้อมูลแสนถึงล้าน row ต่อวันกันเลยทีเดียว! 😱
.
แล้วทำไมต้องใช้ Stored Procedure ? แค่เขียน query ปกติก็ใช้ได้ไม่ใช่หรอ !?
.
📚 ลองนึกภาพตามนะเพื่อนๆ หากระบบของเรามีการเรียกใช้ข้อมูลจำนวนมากๆ เราต้องเขียน Script SQL เพื่อ query ข้อมูลออกมาใช่ไหม หากเราเขียน Script SQL ให้มัน query ตรงๆ แต่มีการเรียกใช้ข้อมูลหลายๆ ครั้ง มันก็ต้องไป query ข้อมูลทุกๆ ครั้งเลย ซึ่งมันจะมีผลต่อประสิทธิภาพของระบบเราน่ะสิ มันอาจจะทำให้ระบบประมวลผลช้าลง ซึ่งจะเกิดผลเสียตามมาอีกมากมาย
.
💾 ซึ่ง Stored Procedure จะมาแก้ปัญหาตรงนี้นั่นเอง!!
.
🔥 การทำงานของ Stored Procedure มันจะทำการเรียกข้อมูลที่เราต้องการออกมาไว้ตั้งแต่ครั้งแรก และหากมีการเรียกใช้งานข้อมูลเดิมๆ ซ้ำๆ อีกครั้ง ก็ไม่ต้องไป query ข้อมูลใหม่ให้เสียเวลาแล้ว ระบบของเราก็จะสามารถทำงานได้มีประสิทธิภาพมากขึ้น
.
👍 ข้อดี
ช่วยลด Network Traffic ระหว่าง Applications และ Database
ช่วยเพิ่มประสิทธิภาพในการ query ข้อมูล
แยกส่วนการทำงานระหว่าง Application Logic และ Database Logic อย่างชัดเจน
หากมี error ใน script สามารถแก้ไขได้ง่าย
.
👎 ข้อจำกัด
หากมีการเพิ่ม หรือย้าย Database ใหม่จะต้องเขียน Stroed Procedure ใหม่ทั้งหมด
.
ทีนี้ก็พอจะเข้าใจพื้นฐานของ Stored Procedure กันขึ้นมาบ้างแล้วเนอะ ใครมีอะไรเพิ่มเติมสามารถเข้ามาแลกเปลี่ยนความคิดเห็นกันได้เลยนะคร้าบบ 😀
.
borntoDev - 🦖 สร้างการเรียนรู้ที่ดีสำหรับสายไอทีในทุกวัน
同時也有1部Youtube影片,追蹤數超過37萬的網紅Savoury Days Kitchen,也在其Youtube影片中提到,A perfect way to turn orange peel into a special treat which is healthy, crunchy, chewy, sweet with wonderful citrus fragrance. Press CC for English s...
「stored procedure」的推薦目錄:
- 關於stored procedure 在 BorntoDev Facebook 的最讚貼文
- 關於stored procedure 在 軟體廚房 Facebook 的最讚貼文
- 關於stored procedure 在 軟體開發學習資訊分享 Facebook 的最佳解答
- 關於stored procedure 在 Savoury Days Kitchen Youtube 的最佳貼文
- 關於stored procedure 在 Stored Procedure VS Simple SQL | Learn SQL Step by Step 的評價
- 關於stored procedure 在 SQL Server Stored Procedures: Returning Data to the Client 的評價
stored procedure 在 軟體廚房 Facebook 的最讚貼文
處處有驚喜,Stored Procedure 再包一層是執行起來比較快嗎?還是說有什麼好處是我不知道的?
stored procedure 在 軟體開發學習資訊分享 Facebook 的最佳解答
MyBatis 是一款優秀的永續層框架,它支援自定義 SQL、Stored Procedure 以及高階對映
https://softnshare.com/mybatis-dao/
stored procedure 在 Savoury Days Kitchen Youtube 的最佳貼文
A perfect way to turn orange peel into a special treat which is healthy, crunchy, chewy, sweet with wonderful citrus fragrance. Press CC for English subtitle. Subscribe to my food blog (in English) for more recipe: http://www.ricenflour.com
INGREDIENTS
200 gr orange peel (from 4 - 5 oranges)
250 gr caster sugar (1C plus 1.5 Tbsp)
100 gr honey (1/4 C plus 1 Tbsp)
Tap water
Salt
Caster sugar and chocolate to cover the candies (optional)
NOTES FOR SUCCESS
1. The longer the peel is soaked in sugar and honey, the better its taste is.
2. The amount of time that the peel is cooked in sugar and honey syrup depends on the thickness of the peel. If the peel is not very thick, don't cook it for too long as it can become very soft.
3. Drying the candies: If you are living in a place with very cool temperature and low humidity, drying the candies at room temperature for hours is completely fine.
However, an oven can helps fasten this procedure. 10 - 20 mins in the oven at 100 - 110 deg. C/ 212 - 230 deg. F is enough to dry the candies. Don't leave them in the oven for too long or they will become hard.
4. For chocolate dip: Melt 80 gr chocolate with 20 gr milk.
5. These candies can be stored in air-tight bags in a dry and cool place for weeks.
-------
Mời các bạn xem công thức cụ thể và các lưu ý để làm mứt vỏ cam ngon tại website: http://www.savourydays.com/mut-vo-cam-mat-ong/
stored procedure 在 SQL Server Stored Procedures: Returning Data to the Client 的美食出口停車場
This video is part of LearnItFirst's Transact-SQL Programming: SQL Server 2008/R2 course. More information ... ... <看更多>
stored procedure 在 Stored Procedure VS Simple SQL | Learn SQL Step by Step 的美食出口停車場
For more such videos visit http://www.questpond.comSee our other Step by Step video series below :-For more ... ... <看更多>