We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I’m using SQLite for a prepared database, but I’m encountering an issue where querying even 70 rows of data takes about 4 minutes.
here is my code for querying the database `
export const getNouns = async query => { var nouns = []; var message = ''; console.log('Query home:' + new Date(), query); await db.transaction( tx => { console.log('Query home trans:' + new Date(), query); tx.executeSql( query, [], (tx, results) => { console.log('Query home result:' + new Date(), results); for (let i = 0; i < results.rows.length; ++i) { nouns.push(results.rows.item(i)); } return nouns; }, error => { console.log('error while executing the query: Execute: ', error); message = `error while executing the query: Execute: ${error}`; }, ); }, error => { console.log('error while executing the query: Transaction:', error); message = `error while executing the query: Execute: ${error}`; }, ); return nouns; };
here is how i call the function to get the data
` const MainHome = () => { var nouns = []; useEffect(() => { async function fetchData() { nouns = await getNouns('SELECT Id, Text, User, CreatedAt FROM Messages'); } fetchData(); }); console.log(`Messages Home page:` + new Date(), nouns); return ( <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}> <Text>Main Home Screen </Text> {nouns.map(item => { return ( <View key={item.Id}> <Text> {item.User}</Text> </View> ); })} </View> ); };
here is the screenshot of the time taken to call the function and process it
I was wondering if there is any way to quickly process the data?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I’m using SQLite for a prepared database, but I’m encountering an issue where querying even 70 rows of data takes about 4 minutes.
here is my code for querying the database
`
here is how i call the function to get the data
here is the screenshot of the time taken to call the function and process it
I was wondering if there is any way to quickly process the data?
The text was updated successfully, but these errors were encountered: