logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: An optimization question: msg#00022

Subject: Re: An optimization question
2007/3/9, Ohad Lutzky <lutzky-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>:
> On 3/9/07, Clodoaldo 
> <clodoaldo.pinto.neto-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote:
> > 2007/3/9, Ohad Lutzky <lutzky-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>:
> > > And when running them,
> > > $ time python benchmark.py && time python benchmark2.py
> > >
> > > real    0m2.876s
> > > user    0m0.624s
> > > sys     0m0.192s
> > >
> > > real    0m1.503s
> > > user    0m0.368s
> > > sys     0m0.196s
> >
> > What happens if you invert the benchmark order?:
> > $ time python benchmark2.py && time python benchmark.py
>
> $ time python benchmark2.py  && time python benchmark.py
>
> real    0m1.526s
> user    0m0.432s
> sys     0m0.104s
>
> real    0m2.777s
> user    0m0.556s
> sys     0m0.224s
>
> No difference.
>
> > I use prepared queries wiht psycopg2 hopping it would lead to better
> > performance, but I have never benchmarked it.
>
> Do you mean by using explicit "PREPARE" and "EXECUTE" queries, or by
> some other means?

I use explicit "PREPARE" and "EXECUTE"

> Because even a manual way to prepare a statement
> (similar to the one available in Perl's DBI, $statement =
> $dbh->prepare("SELECT * FROM table WHERE param=?");
> $statement->execute(5);) would be great.

Regards,
-- 
Clodoaldo Pinto Neto


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe