On 26 Dec 2012, at 4:28pm, genliu777 <doityth...@163.com> wrote:

> the reason that i talk about how to get ROWID of record is that i want to
> access specific record by the FASTEST way!
> 
> i read the document of sqlite again, and find if i define a field(e.g.
> social_num) with the feature of  "*integer primary key*" , i can access
> record by the value of the field in the fastest way. 
> 
> is it true!?

No.  There is no big difference in speed between accessing one field or another 
just because it's an integer primary key.  Just keep doing your SELECT commands 
for fields.  SQLite is very well written and it is always fast.

My advice to you is not to worry about speed at this point.  Just make a 
program that works.  Once you learn more about SQL you will learn about 
creating INDEXes so that each SELECT always has a good way to find the rows it 
wants.  But you don't need to worry about that here because there's already an 
INDEX that makes finding the rowid column fast.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to