Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be more consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.lang.python / Re: Postgresql equivalent of Python's timeit?

SubjectAuthor
o Postgresql equivalent of Python's timeit?Peter J. Holzer

1
Re: Postgresql equivalent of Python's timeit?

<mailman.304.1694800362.23016.python-list@python.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24234&group=comp.lang.python#24234

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-python@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: Postgresql equivalent of Python's timeit?
Date: Fri, 15 Sep 2023 19:45:16 +0200
Lines: 48
Message-ID: <mailman.304.1694800362.23016.python-list@python.org>
References: <DB9PR10MB6689DAF34D22145FB382828083F6A@DB9PR10MB6689.EURPRD10.PROD.OUTLOOK.COM>
<20230915174516.2uliozlczlu7dxcq@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="6rjubrrapyavh6ph"
X-Trace: news.uni-berlin.de gvklwyPYcwtZwmiPH2IZsAhKWsUDEtLpG9TT/aILKO6A==
Cancel-Lock: sha1:sbhVfDZYYP26flHUiAe5iebDIgk= sha256:sAptQoWa9QD7bJOWqN2c72uda8L5uBsRPQTqdffulZg=
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python?': 0.03; 'content-
type:multipart/signed': 0.05; 'row': 0.05; 'content-
type:application/pgp-signature': 0.09; 'filename:fname piece:asc':
0.09; 'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; 'subject:Python': 0.12;
'"creative': 0.16; '+0200,': 0.16; '__/': 0.16; 'challenge!"':
0.16; 'from:addr:hjp-python': 0.16; 'from:addr:hjp.at': 0.16;
'from:name:peter j. holzer': 0.16; 'hjp@hjp.at': 0.16; 'holzer':
0.16; 'ok.': 0.16; 'reality.': 0.16; 'stross,': 0.16; 'times,':
0.16; 'url-ip:212.17.106/24': 0.16; 'url-ip:212.17/16': 0.16;
'url:hjp': 0.16; '|_|_)': 0.16; 'wrote:': 0.16; 'python': 0.16;
'to:addr:python-list': 0.20; 'python,': 0.25; 'bit': 0.27;
'function': 0.27; 'sense': 0.28; 'python-list': 0.32; 'but': 0.32;
'there': 0.33; 'same': 0.34; 'header:In-Reply-To:1': 0.34;
'quite': 0.39; 'explain': 0.40; 'want': 0.40; 'likely': 0.61;
"there's": 0.61; 'received:212': 0.62; 'simply': 0.63; 'times.':
0.64; 'received:userid': 0.66; 'url-ip:212/8': 0.69; 'times':
0.69; 'analyze': 0.75; 'queries': 0.81; 'postgresql': 0.84;
'received:at': 0.84; 'variation': 0.91
Mail-Followup-To: python-list@python.org
Content-Disposition: inline
In-Reply-To: <DB9PR10MB6689DAF34D22145FB382828083F6A@DB9PR10MB6689.EURPRD10.PROD.OUTLOOK.COM>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20230915174516.2uliozlczlu7dxcq@hjp.at>
X-Mailman-Original-References: <DB9PR10MB6689DAF34D22145FB382828083F6A@DB9PR10MB6689.EURPRD10.PROD.OUTLOOK.COM>
 by: Peter J. Holzer - Fri, 15 Sep 2023 17:45 UTC
Attachments: signature.asc (application/pgp-signature)

On 2023-09-15 17:42:06 +0200, Albert-Jan Roskam via Python-list wrote:
> This is more related to Postgresql than to Python, I hope this is ok.
> I want to measure Postgres queries N times, much like Python timeit
> (https://docs.python.org/3/library/timeit.html). I know about EXPLAIN
> ANALYZE and psql \timing, but there's quite a bit of variation in the
> times. Is there a timeit-like function in Postgresql?

Why not simply call it n times from Python?

(But be aware that calling the same query n times in a row is likely to be
unrealistically fast because most of the data will already be in
memory.)

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)

devel / comp.lang.python / Re: Postgresql equivalent of Python's timeit?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor