Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'indexes': 0.09; 'sql,': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'programs.': 0.14; 'sqlite': 0.16; 'subject:sqlite3': 0.16; 'url:sqlite': 0.16; 'index': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; '>': 0.26; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; 'subject:) ': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'table': 0.34; "i'd": 0.34; 'subject: (': 0.35; 'info': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'expensive': 0.39; 'field.': 0.61; 'full': 0.61; 'new': 0.61; "you're": 0.61; "you'll": 0.62; 'name': 0.63; 'subject:more': 0.64; 'more': 0.64; 'to:addr:gmail.com': 0.65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HpgN8BjncCWeqcb9Nxe8IqObewi8AQysBGTlaN4i7cM=; b=gjHlfx6qk0imlquPtTCZKW5o0EXcv2bCllrRlf5EgkFjuAxpI0SKvrIHo+mkgl7PcJ Y/leOW9u1wGkMNXRRvENa+mAw9fDzJ3Q99Bfosad+YY77458MZsKtHQ0bspWP749ncmK s2kirXmgf3QW+hsMAFHnAc/IEbZ9+WP9bgbyF//2nkDmMpBn4/+9iPh6b6vPkLxxW8pw tNrkRo4puJHgJSpFSYw3DpV4xGz9G7lS01KVdpdbI4uxpleut16mP0yDNN6KJkAEee9k ou2T9xRFrDqmXoVgfT9XHybZJzo5S8Fu/LKMIFVhkwdoRIoVnl1hvFWpee3jWBu03Zc5 0Cvw== MIME-Version: 1.0 X-Received: by 10.112.143.132 with SMTP id se4mr16779066lbb.53.1401939339400; Wed, 04 Jun 2014 20:35:39 -0700 (PDT) In-Reply-To: <87670ef0-7493-4c1d-96c9-753b0f759723@googlegroups.com> References: <6e18a509-9471-4fe8-8664-3c58fc17536f@googlegroups.com> <87670ef0-7493-4c1d-96c9-753b0f759723@googlegroups.com> Date: Wed, 4 Jun 2014 20:35:39 -0700 Subject: Re: How to use SQLite (sqlite3) more efficiently From: Demian Brecht To: Rustom Mody Content-Type: multipart/alternative; boundary=089e01227df4525e1204fb0e7045 Cc: Python X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401939346 news.xs4all.nl 2935 [2001:888:2000:d::a6]:35726 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72674 --089e01227df4525e1204fb0e7045 Content-Type: text/plain; charset=UTF-8 > > 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. --089e01227df4525e1204fb0e7045 Content-Type: text/html; charset=UTF-8

> > 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.

--089e01227df4525e1204fb0e7045--