Java??????дSQL???????10??????
???????????? ???????[ 2015/3/10 11:17:28 ] ????????Java ??????? ?????
????????????????????????????——??Java??????дSQL???????10??????——????????????????????DZone???????????????????????????г???????????£?
????SQL??????Java?????ж???????
??????????SQL???????????????????????
???????embracing SQL??????????? jOOQ??MyBatis????????SQL??????????÷?????г???????? ????????????????????????????????“SLICK’s mailing list”??SLICK??Scala?е????????SQL?????????????????LINQ??????LINQ-to-SQL?????????????????????????SQL?????????
??????????Σ?????????г????????????????????????????????10???????????????Java????????дSQL????????????????
????1??????PreparedStatements
????????????????JDBC???????????????????????????????????????????б??У???????????????????????????????????????PreparedStatements???????????????????
?????????PreparedStatements?????
??????????????PreparedStatements?????
???????????дPreparedStatements?????
???????????????????????????96%??????У???PreparedStatement?????????????á???????????????Щ???????
????????????????inlining bind values???????????????????????????????
?????????????????????????????????SQL????????
?????????????“?????”????????????????????????????????????????????????edge-cases????
???????????PreparedStatements???????????????????????????°??????????и??á?
???????????????????????????adaptive cursor sharing——??????α????Oracle?????????????????????????趨???????SQL??????????
??????????????????????????????????SQL?????????????????????????????м???????????????????м?????????CPU????????SGA??????????ò???????????? ?????á?????????????????????????????????????л??豸???????????????????Щ??????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????????????£?
?????Щ??????????????????????????????????????????????????????????ò??????漰?????????????????????“????”?ж??
????DELETED = 1
????STATUS = 42
????????????????“????”?ж??
????FIRST_NAME LIKE “Jon%”
????AMOUNT > 19.95
?????????????????????????????????????bind-variable peeking???????????????£??????????????е?????????e????????д????JPQL??????SQL?????JPA CriteriaQuery????jOOQ??????ε?API?????????????????????????PreparedStatements????????
?????????????????
??????????????bind-variable peeking???????????????????????????????£???????Oracle???Tanel Poder????
?????α?????StackOverflow??????????????
?????????????
???????????£????????PreparedStatements?????澲?????????????????????SQL???????????????
????2???????????
??????????????????????????????????????????м???????????Java?????????????????????????????????
??????Java???????????:
?????? ????????????DAO??????????????select *????????50???У??????????д??????????????????JDBC??????У??????????????????????????????????·?????JDBC??????????? ??????С???????????????2-3??????????????????????IO??????????
???????????????????????????????????С??……
?????????????м??????????
?????? Щ?????????????Java??????????????????????????????????????????????м???????????д?????SQL?????SQL transformation ??????????????е???????????????????????SQL??????????????????????á????д???????????????????????????????Oracle???????????????????
???????????????????????????????????????????????????
????SELECT *
????FROM customer_view c
????JOIN order_view o
????ON c.cust_id = o.cust_id
??????????????????????????????????????ι????????????????? CUSTOMER_ADDRESS??ORDER_HISTORY??ORDER_SETTLEMENT????????select * ???????????????????????????????????????????????????????????????????????Щ??
????SELECT c.first_name?? c.last_name?? o.amount
????FROM customer_view c
????JOIN order_view o
????ON c.cust_id = o.cust_id
????????????????????????SQL????????????Щ??????????????????????????????IO??????????
?????????????
????????????select *??????????????????????в???????????????????????????????????????????????????
?????????????????????-??????ORMs??????????????Щ???
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11