Re: [sqlite] FW: Direct access of table data
Briggs, Re: "I guess I'm just getting greedy since sqlite is so much faster than our standard databases ("progress")." That's a distinct possibility.;-) Re: "When you run a query for select * from table, does it literally copy the contents of the table, or does it just build a structure that points to the data in the table?" When you wrote "points to the data in the table" -- by "table" do you mean the data on your disk drive? If so, then yes, sqlite must read the data into RAM, and at least one ram-to-ram copy is implied. (The data for a row might span multiple db pages.) If you're using an sqlite wrapper, that may possibly perform a copy as well. If you're using multi-megabyte BLOB's then these can be an exception, as you may read them incrementally: http://www.sqlite.org/c3ref/blob_read.html If, however, you're NOT using large blobs, then considerations such as your synchronization level, http://www.sqlite.org/pragma.html#pragma_synchronous indexing, page size, etc. are usually much more important to performance than a ram-to-ram copy. Again, have you measured the time to perform the query in question? Is it worrisome? If not, don't worry. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] FW: Direct access of table data
From: Nathan Biggs [mailto:nbi...@mycfs.com] Sent: Wednesday, April 21, 2010 2:43 PM To: Griggs, Donald Subject: Re: [sqlite] Direct access of table data Griggs, Thanks for the quick reply. I guess I'm just getting greedy since sqlite is so much faster than our standard databases ("progress"). When you run a query for select * from table, does it literally copy the contents of the table, or does it just build a structure that points to the data in the table? On 4/21/2010 2:29 PM, Griggs, Donald wrote: Hello Biggs, this is Griggs, Re: "Is there a way to read the values of a table directly without building and executing a query. I have a function that has predefined memory..." No easy way. The sophistication of database abstraction is the reason you presumably chose to use sqlite. Re: "I thought it might perform much [better] without all .." If you've measured this and the query truly takes too long, you might try (in order): 1) trying to optimize the query (do you have ideal indexing, for instance?) 2) restructure your data/program 3) use a simple file rather than a database Regards, Donald Griggs ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users