I would like to know why ORMLite & GreenDAO are faster then traditional SQLite ? As per my knowledge internally all are doing same quires for interacting with database like SQLite then why others are faster? Thanks in advance !!
Asked
Active
Viewed 2,367 times
2
-
read this http://stackoverflow.com/questions/20079568/orm-performance-is-greendao-faster-than-ormlite – Mohammad Tauqir Sep 20 '15 at 16:30
-
Please post the code that you wrote comparing ORMLite, greenDAO, and SQLite. Otherwise, we cannot really comment upon that code. – CommonsWare Sep 20 '15 at 16:31
-
@CommonsWare I didn't write any code for testing , I just want to have knowledge behind the it's faster mechanism. I didn't find answer of my above question that's why I asked one. I will appreciate your help if you will lighten up on this concept. Thanks in advance !! – Adarsh Yadav Sep 20 '15 at 16:34
-
@Tauqir :- I have alredy been this link but still the idea for being faster then sqlite is not clear to me.I will appreciate your help if you will lighten up on this concept. Thanks in advance !! – Adarsh Yadav Sep 20 '15 at 16:36
-
"I just want to have knowledge behind the it's faster mechanism" -- then please cite your proof that "ORMLite & GreenDAO are faster then traditional SQLite". – CommonsWare Sep 20 '15 at 16:50
-
@CommonsWare :- I don't have any proof for that this is the only reason I am asking for it. But as per blogs and discussion many times I have read it that ORMLite & GreenDAO are faster then SQLite. If it's not true in any way then why we use ORMLite & GreenDAO ? Just because of that they are easy to use? May be I am wrong or not getting exact idea but above question asked by many interviewers. – Adarsh Yadav Sep 20 '15 at 16:57
-
1"But per blogs and discussion many times I have read it that ORMLite & GreenDAO are faster then SQLite" -- then perhaps you may wish to see if any of *them* have proof, then examine that proof. Performance analysis is a complex subject; only by examining the code of benchmarks can you determine what the benchmarks measure and what the benchmarks do not measure. "why we use ORMLite & GreenDAO ?" -- well, personally, I don't use them. "Just because of that they are easy to use?" -- that is classic reason for using an ORM in Java (see: Hibernate for J2EE Web apps). – CommonsWare Sep 20 '15 at 17:01
-
@CommonsWare Thanks !! – Adarsh Yadav Sep 20 '15 at 17:18
1 Answers
15
I would like to know why ORMLite & GreenDAO are faster then traditional SQLite ?
If you are saying "faster" in terms of runtime performance, they aren't. As the author of ORMLite, I can assure you that hand SQL is "faster" when looking just at runtime.
ORM libraries are good in that you don't have to write or maintain the associated database code and can just deal with Java entities and utility classes. This is especially true if you have a complex schema with a lot of different entities that would require a lot of time to keep your hand SQL in sync. ORM libraries are arguably faster to develop and maintain the code but are not faster in terms of application performance if you know what you are doing.

Gray
- 115,027
- 24
- 293
- 354