Is there a limit to sampdb(SQLite) rows ?
#5

Compare it to real-life.
What would you rather do faster and better, when your wife asks you to go buy 100 beer cans for a party for example?

Go one time to the store and buy all 100 cans at once? (compares to 1 query to get 100 rows)
Or go 100 times to the store to buy 1 can at a time? (compares to 100 queries to get 1 row at a time)

The same goes for your queries.
Sending 1 query to fetch 1000 rows is alot faster than sending 1000 queries to fetch 1 row each time.
A query needs to search your entire database to find the row you need, read it and send it back to your script.
1 query = 1 search.
1000 queries = 1000 searches.

1000 rows is nothing for a database.
That's why it's called a DATAbase.
It is designed to handle huge amounts of data.
MySQL allows 4 gigabyte of data to be returned in one result-set to the program that sent the query.
That's 1 query to fetch 4Gb of data at once.

1000 rows is maybe 100 kilobytes of data, so it's almost nothing compared to what databases can handle.

And yes, "SELECT * FROM table" returns your entire table (even if it has 1 million rows), unless you specify a limit like "SELECT * FROM table LIMIT 1000".
Reply


Messages In This Thread
Is there a limit to sampdb(SQLite) rows ? - by Ahmad45123 - 23.04.2015, 20:10
Re: Is there a limit to sampdb(SQLite) rows ? - by Vince - 23.04.2015, 20:16
Re: Is there a limit to sampdb(SQLite) rows ? - by Sergei - 23.04.2015, 20:19
Re: Is there a limit to sampdb(SQLite) rows ? - by Ahmad45123 - 23.04.2015, 20:19
Re: Is there a limit to sampdb(SQLite) rows ? - by PowerPC603 - 23.04.2015, 21:05

Forum Jump:


Users browsing this thread: 1 Guest(s)