I was wondering why the JDBC driver for sqlite is so terribly slow.
When I execute the following query it takes me around 3 minutes to
execute it in Java. If I execute the same query on the command line of
sqlite it takes around 1 second.
Whether I use the native version (0.42) or the pure java version
(nested-v042) does not matter much.
The query is:
select iptc_id as id,tagname,count(distinct photo_id) as number
from annotation,iptc,temp1 where iptc_id=iptc.id and
photo_id=temp1.id
group by iptc_id
having count(distinct tag_id)>1 or number<(select count(*) from
temp1)
order by tagname
The code:
Class.forName("org.sqlite.JDBC");
connection = DriverManager.getConnection("jdbc:sqlite:album.db");
PreparedStatement usedIptc =
connection.prepareStatement(theAboveQuery);
ResultSet resultSet = usedIptc.executeQuery();
Anybody an idea to improve the performance?
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---