如何计时多次查询? [英] How to time several queries?

查看:73
本文介绍了如何计时多次查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


我知道可以通过设置psql中的

\ timing选项来计算隔离查询。这使得PgSQL报告了执行一次操作所需的时间。


我想知道如何获得许多操作的时间摘要,如果

它尽可能。


谢谢。


Tim

---------------------------(广播结束)------------------ ---------

提示9:如果您的

加入列的数据类型不匹配,规划人员将忽略您选择索引扫描的愿望

Hello

I know it is possible to time isolated queries through the settting of the
\timing option in psql. This makes PgSQL report the time it took to
perform one operation.

I would like to know how one can get a time summary of many operations, if
it is at all possible.

Thank you.

Tim
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column''s datatypes do not match

推荐答案

大家好,


我正在尝试创建一个php表单使用

登录postgress不同级别的密码和超级用户的第一次测试不是
工作,除非我指定数据库名称。我想允许

超级用户登录而不指定数据库,这样他们就可以从Web界面创建新的用户,数据库等。在下面的例子中有没有人看到我在做错了什么?


感谢您的帮助,


Ken


----------------------------------- ----------

我定义了一个像这样的超级用户


CREATE USER user_name CREATEUSER PASSWORD''password''


尝试通过以下网页形式登录:


用户:user_name

密码:密码


但是除非我指定数据库,否则连接总是失败。


相关PHP:


<?php


函数LogInUser()

{

if(isset(
Hello all,

I''m trying to create a php form for logging in to postgress with
different level passwords and my first test with a superuser isn''t
working unless I specify a database name. I would like to allow
superusers to log in without specifying a database so they can create
new users, databases etc from a web interface. Does anyone see what I''m
doing wrong in the following example?

Thanks for any help,

Ken

---------------------------------------------
I defined a super user like so

CREATE USER user_name CREATEUSER PASSWORD ''password''

Try to log in through a web form like so:

User: user_name
Password: password

but the connection always fails unless I specify a database.

Relevant PHP:

<?php

function LogInUser()
{
if (isset(


_POST [ ''user_name''])&&

isset(
_POST[''user_name'']) &&
isset(


_POST [''password'']))

{
_POST[''password'']))
{


这篇关于如何计时多次查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆