Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; '16,': 0.03; 'binary': 0.05; 'received:mail-vb0-f46.google.com': 0.09; 'sqlite': 0.09; 'subject:files': 0.09; 'cc:addr:python-list': 0.10; 'amenable': 0.16; 'csv,': 0.16; 'json,': 0.16; 'oct': 0.16; 'subject:fastest': 0.16; 'verbose': 0.16; 'wrote:': 0.17; 'pfxlen:0': 0.17; 'specify': 0.17; 'received:209.85.212.46': 0.18; '(or': 0.18; 'python?': 0.20; 'disclaimer': 0.22; 'cheers,': 0.23; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'chris': 0.28; '(unless': 0.29; 'pickle': 0.29; 'url:python': 0.32; 'etc.)': 0.32; 'subject:data': 0.33; 'received:google.com': 0.34; 'fastest': 0.35; 'protocol': 0.35; 'doing': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; '(i.e.': 0.36; 'url:library': 0.36; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'some': 0.38; 'url:docs': 0.38; 'sure': 0.38; 'header:Received:5': 0.40; 'end': 0.40; 'your': 0.60; 'p.s.': 0.63; 'series': 0.63; 'sender:addr:chris': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=t0RyJVVit8KKIjsB6f9PYdYaw3lJrqkmWv6mAGH5wHw=; b=VeIHkKvr3CfZcUaZMELruMVvNXtlK8wCgo4PKrYDjfCpqr/IQRivXY6S4SYpRoWSOK rtQGnUQE8bLbJ0McjMBrrz1yRLAuaFOjL1XfNFjY7TR9YdljaBV/mTB3lsO0ZO4KA4Br Hz0SPoIBi7g7SFUqi9lMbGeLK5U43BYnTccKA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=t0RyJVVit8KKIjsB6f9PYdYaw3lJrqkmWv6mAGH5wHw=; b=XBcilXQreMFLPPM1i7fJjBqbQZB0QdKeI/KlFgfKdcAJ8mbEGLfF8ADM65Nd8vYz+n FB2oFQRkif/uOsROdK3+r5EzIs7uuK4tPUccuIqpLMVk6ssZrrFwq52QW4W2KgXoswhY MX1jKzs0niEQeIUY+HxETvbgGtA1PRZtvwZFv218rprcrL5HGeVyl1aCFU+pl7Kijm52 5Qyb2P6KPEVmRqlSMYHcdctnxb1Ha32m61GsV1haVN4iIj2BegMY/vCCS2D1d3wKvHry AUqa1I2L98c/OswjOV9hZzwLdVbifv0Y1IvJQfEOulCKsNexF66p8l+rt5xiq+58WL/A D3Kg== MIME-Version: 1.0 Sender: chris@rebertia.com In-Reply-To: <76D03718A3233B4C8CC236C169B535B5A23DFDFD86@AUSP01VMBX08.collaborationhost.net> References: <76D03718A3233B4C8CC236C169B535B5A23DFDFD86@AUSP01VMBX08.collaborationhost.net> Date: Sun, 28 Oct 2012 02:26:14 -0700 X-Google-Sender-Auth: IZ5VM8bdF6XRVZKRfz_MCC1KIJk Subject: Re: fastest data / database format for reading large files From: Chris Rebert To: Pradipto Banerjee Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQklRIiskmS/0x95Zho/CBgOCIQce9s9IHoyWLMy2jN/vuLwGm6ms8zsHjWqMb5/F2Eb/si+ Cc: "Python-list@python.org" 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351416384 news.xs4all.nl 6862 [2001:888:2000:d::a6]:42535 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32308 On Tue, Oct 16, 2012 at 11:35 AM, Pradipto Banerjee wrote: > I am working with a series of large files with sizes 4 to 10GB and may need to read these files repeated. What data format (i.e. pickle, json, csv, etc.) is considered the fastest for reading via python? Pickle /ought/ to be fastest, since it's binary (unless you use the oldest protocol version) and native to Python. Be sure to specify HIGHEST_PROTOCOL and use cPickle. http://docs.python.org/2/library/pickle.html#module-cPickle http://docs.python.org/2/library/pickle.html#pickle.HIGHEST_PROTOCOL You might consider using SQLite (or some other database) if you will be doing queries over the data that would be amenable to SQL or similar. http://docs.python.org/2/library/sqlite3.html Cheers, Chris P.S. The verbose disclaimer at the end of your emails is kinda annoying...