::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

which is faster? Statement or PreparedStatement

°Ô½ÃÆÇ
JAVA
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2017-11-21 17:26:51
ÀÐÀº¼ö
1332
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ
°ü·Ã¸µÅ©01
https://stackoverflow.com/questions/9548089/which-is-faster-statement-or-preparedstatement 
µ¿ÀÏÇÑ statement(Äõ¸®)¸¦ µ¥ÀÌÅ͸¸ ´Ù¸£°Ô ÇÏ¿© ¿©·¯¹ø È£Ãâ ÇÏ´Â °æ¿ì Prepared statements °¡ ºü¸¨´Ï´Ù.
¿Ö³ÄÇϸé, SQL °ËÁõ(validate)À» Çѹø¸¸ Çϱ⠶§¹®ÀÌÁÒ. ¹Ý¸é Statement ´Â ¸Å Äõ¸® ¼öÇà½Ã¸¶´Ù °ËÁõÀ» ÇÏ°Ô µË´Ï´Ù.

PreparedStatement ÀÇ ¶Ç ´Ù¸¥ ÀÌÁ¡Àº SQL Injection °ø°ÝÀ» ȸÇÇÇÒ ¼ö ÀÖ´Ù´Â °Ì´Ï´Ù.
¸¸ÀÏ ¸Þ¼­µå¸¦ È£ÃâÇÒ ¶§¸¶´Ù PreparedStatement ¸¦ »õ·Î »ý¼ºÇÑ´Ù¸é, ¾Õ¼­ À̾߱âÇÑ PreparedStatement ÀÇ ÀÌÁ¡ÀÌ »ç¶óÁú °ÍÀÔ´Ï´Ù.

»ç¿ëÇÏ´Â DB(mysql, postgres...)°¡ ¹«¾ùÀÎÁö ±¸¾Ö¹ÞÁö ¾Êµµ·Ï persistence layer ¿¡ ĸ½¶È­ÇÏ´Â °ÍÀÌ Áß¿äÇÕ´Ï´Ù.
±×·¯¸é PerparedStatement ·Î ¼º´É°ú º¸¾È µÎ¸¶¸® Åä³¢¸¦ ÀâÀ» ¼ö Àְڳ׿ä.
¿ÏÀü ±âÃÊÀûÀÎ ³»¿ëÀε¥ Çϳªµµ »ý°¢ÀÌ ¾È³­´Ù.

 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
14282 helix 1861 2018-04-05 10:47:10
14281 helix 1746 2018-04-05 10:31:07
14237 helix 6157 2017-12-01 15:18:39
14236 helix 5875 2017-12-01 14:49:07
14232 helix 4743 2017-11-22 17:56:06
helix 1332 2017-11-21 17:26:51
14229 helix 2613 2017-11-20 09:48:13
14192 helix 7204 2017-08-21 12:26:24
14122 helix 3762 2017-06-27 15:11:55
14068 helix 6678 2017-05-11 16:54:22
14064 helix 5442 2017-05-08 17:51:25
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.016 Secs