Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'sql.': 0.07; 'indexes': 0.09; 'sake': 0.09; 'changes': 0.15; 'in-memory': 0.16; 'received:172.18.0': 0.16; 'subject:tabular': 0.16; 'thanks,': 0.17; 'code.': 0.18; 'hey': 0.18; 'fit': 0.20; 'import': 0.22; 'to:name:python-list@python.org': 0.22; 'query': 0.26; 'switch': 0.26; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'getting': 0.31; 'skip:s 30': 0.35; 'add': 0.35; 'interface,': 0.36; 'subject:data': 0.36; "i'll": 0.36; 'effort': 0.37; 'too': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:unknown': 0.61; 'simply': 0.61; 'take,': 0.84 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=vC3pk2euBDNChG//pvWvL3ooOWecHx7HOhb0No4pI08= c=1 sm=1 a=P90J6pEA2ccA:10 a=BLceEmwcHowA:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=g3mLq75WYuDrh3Lt0JSDww==:17 a=KA1GpDI4f_uywdpWFR4A:9 a=wPNLvfGTeEIA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.activenetwerx.com X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 From: "Joseph L. Casale" To: Kushal Kumaran , "python-list@python.org" Subject: Re: Hashed lookups for tabular data Thread-Topic: Hashed lookups for tabular data Thread-Index: AdAz8ITsOlDb5rdsT/6XGbGmQKKOvAAPhuYA//+35wGAABmpDoAABQco Date: Mon, 19 Jan 2015 18:59:49 +0000 References: <84c6e1d5671842038e81994478fb5476@exch.activenetwerx.com> <1421687345419.39659@activenetwerx.com>, <8761c2k6m8.fsf@mercury.locationd.net> In-Reply-To: <8761c2k6m8.fsf@mercury.locationd.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.18.0.4] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421693993 news.xs4all.nl 2938 [2001:888:2000:d::a6]:55062 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84026 > If you want an sql-like interface, you can simply create an in-memory=0A= > sqlite3 database.=0A= > =0A= > import sqlite3=0A= > db =3D sqlite3.Connection(':memory:')=0A= > =0A= > You can create indexes as you need, and query using SQL. Later, if you= =0A= > find the data getting too big to fit in memory, you can switch to using= =0A= > an on-disk database instead without significant changes to the code.=0A= =0A= Hey kushal,=0A= For the effort it would take, I'll add an implementation using this this=0A= when I start profiling for the sake of curiosity.=0A= =0A= Thanks,=0A= jlc=