Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #72683
| References | <6e18a509-9471-4fe8-8664-3c58fc17536f@googlegroups.com> <mailman.10716.1401917009.18130.python-list@python.org> <87670ef0-7493-4c1d-96c9-753b0f759723@googlegroups.com> <CAE+T62b+Xo8A6NccXCF40szKdiBVO4d7bu0dBsDcGZF3zioq6Q@mail.gmail.com> |
|---|---|
| Date | 2014-06-05 17:08 +1000 |
| Subject | Re: How to use SQLite (sqlite3) more efficiently |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10726.1401952098.18130.python-list@python.org> (permalink) |
On Thu, Jun 5, 2014 at 1:35 PM, Demian Brecht <demianbrecht@gmail.com> wrote: >> > On Thu, Jun 5, 2014 at 6:27 AM, ps16thypresence wrote: >> >> > > I'm completely new to SQL, and recently started using SQLite in >> > > one of my Python programs. > > Unrelated to Python but as you're new to SQL I figured I'd ask: Do you have > an index on the name field? If you don't, you'll incur a full table scan > which will be more expensive than if you have an index in the field. > > For more info about indexes see http://www.sqlite.org/lang_createindex.html. It's the primary key, which I would normally assume is indexed implicitly. This is another reason for not breaking the CREATE TABLE statement at the point where the OP did; it's not obvious that that field is indexed, this way. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to use SQLite (sqlite3) more efficiently ps16thypresenceisfullnessofjoy@gmail.com - 2014-06-04 13:27 -0700
Re: How to use SQLite (sqlite3) more efficiently Chris Angelico <rosuav@gmail.com> - 2014-06-05 07:23 +1000
Re: How to use SQLite (sqlite3) more efficiently Rustom Mody <rustompmody@gmail.com> - 2014-06-04 19:15 -0700
Re: How to use SQLite (sqlite3) more efficiently Demian Brecht <demianbrecht@gmail.com> - 2014-06-04 20:35 -0700
Re: How to use SQLite (sqlite3) more efficiently Chris Angelico <rosuav@gmail.com> - 2014-06-05 17:08 +1000
Re: How to use SQLite (sqlite3) more efficiently Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-06-04 22:40 -0400
Re: How to use SQLite (sqlite3) more efficiently Peter Otten <__peter__@web.de> - 2014-06-05 09:48 +0200
csiph-web