Use hibernate performance: inserted very quickly, can you find why it is very slow? ? ? ? ?

xiaoxiao2021-03-06  69

Published: Mar 18, 2004 7:30 PM

Reply This is a very old post, and it is pushed forward. Hibernate is mainly to turn the relational database to an image-like object, and the purpose is to develop the convenience of maintenance code. But in him, some things outside the question have been paid too much, and there is a lot of waste. As such performance, don't only appear here, EJB, Struts have a post, why, the foundation is not strong! If you know how much time you read, how much time you want to read hard drive data, read continuous bytes and a single byte time difference, know that the hard disk IO is still multiple, these seem simply, but foundative things How to think about these problems, but also do so much test. Waste time. List, reading, iTerate first check Key again. Decomposition in DB: JDBC: SQL to DB (Select * from table) -> SQL parsing -> Chesstribute Zone -> Check Data -> Find data -> Data Return List: Hibernate parsing List action SQL (SELECT * from Table) -> SQL to DB -> SQL Analysis -> Chess Assist Area -> Character -> Find Data -> Data Return -> Hibernate Configure the data to ListIterate: Hibernate analyzes the List action into SQL (SQL to DB -> SQL to DB -> SQL Analysis -> Checking Zone -> Data Return -> Hibernate Configured Data into Iterate for each next method Yes, Hibernate analyzes the List action into SQL (Select * from table where key ..) -> SQL parsing (only the first parsing) -> Check the zone area -> Data Return -> Hibernate Configure the data What is more than JDBC, Hibernate analyzes the List action into SQL (SELECT * from table) Itereate more than JDBC, more SQL parsing, more SQL transmission and data transmission action, DB data query It can be used to read continuous data with less. So, why is it slow, it's these places.

Starfeng published article: 18 Registration time: 2003-08 Re: Use hibernate performance: inserted very fast, can you find why? ? ? ? ? Published: Mar 18, 2004 7:36 PM

Reply to supplement a little, usually we use SQL to bring WHERE, in order to simplify, no WHERE conditions. WHERE reflects the value of index

转载请注明原文地址:https://www.9cbs.com/read-92270.html

New Post(0)