This is not any update or insert statement. This is just a select
statement. Will that help if i change the driver ? I am currently using
sqlitejdbc-v056.jar
Thanks
Sridhar
On 03-06-2011 18:59, Sridhar Polavarapu wrote:
> Hi
>
> One of my sqlite query executes faster in sqlite manager( firefox
> addon ) but take a lot of time to execute using a java program. Here
> is the snippet
>
> PreparedStatement mStatement;
> ResultSet mResults;
> CachedRowSetImpl impl=null;
> Connection mconn = null;
> try
> {
> Class.forName("org.sqlite.JDBC");
> mconn = DriverManager.getConnection("jdbc:sqlite:" +
> "database.db");
> mStatement = mconn.prepareStatement(jobQuery);
> long startTime = System.currentTimeMillis();
> mResults = mStatement.executeQuery();
> long endTime = System.currentTimeMillis();
> System.out.println(jobQuery);
> System.out.println("Time taken to execute query ==>"
> +(endTime - startTime));
> impl = new CachedRowSetImpl();
> impl.populate(mResults);
> mStatement.close();
> mResults.close();
>
> }
> catch (SQLException e) {
> e.printStackTrace();
> }
>
> Is there anything that I am missing while connecting using java ? Any
> help appreciated.
>
> Sridhar
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users