-2

When fatching large no. of records in android sqlite using Cursor.movetoNext() taking more time in Android compare to IOS platform. Is there any way to reduce the time of Cursor.movetoNext() or use something else

I used Cursor resultSet = super.executeSqlAndGetResultSet(sql);

 public Cursor executeSqlAndGetResultSet(String sql) throws Exception{
       DatabaseOps db = DatabaseOps.defaultDatabase();
       Cursor resultSet = db.executeQuery(sql, null); 
       return resultSet;
}

Using cursor.movetoNext() taking long time as compare to IOS in Android

while(cursor.movetoNext()){  
//block to iterate column value of database table.
}

1 Answers1

1

I think you have to display data with fast database execution so you can go with custom SimpleCursorAdapter. I hope this approach will help.

Please refer Using custom simpleCursorAdapter

hharry_tech
  • 952
  • 1
  • 8
  • 24