IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PostgreSQL Discussion :

tracer le traitement d'une requête


Sujet :

PostgreSQL

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Février 2004
    Messages
    199
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 199
    Points : 96
    Points
    96
    Par défaut tracer le traitement d'une requête
    Bonjour,

    voilà,

    J’aimerai tracer le traitement d'une requête (parser, rewriter, optimizer). C’est donc naturellement que je me suis tourné à la doc qui m'a recomender de modifier le fichier postgresql.conf. les modifications sont comme suit :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
     
    #---------------------------------------------------------------------------
    # ERROR REPORTING AND LOGGING
    #---------------------------------------------------------------------------
     
    # - Where to Log -
     
    #log_destination = 'stderr'		# Valid values are combinations of 
    					# stderr, syslog and eventlog, 
    					# depending on platform.
     
    # This is used when logging to stderr:
    redirect_stderr = on			# Enable capturing of stderr into log 
    					# files
    					# (change requires restart)
     
    # These are only used if redirect_stderr is on:
    log_directory = 'pg_log'		# Directory where log files are written
    					# Can be absolute or relative to PGDATA
    log_filename = 'postgresql-%a.log'      # Log file name pattern.
    					# Can include strftime() escapes
    log_truncate_on_rotation = on  # If on, any existing log file of the same 
    					# name as the new log file will be
    					# truncated rather than appended to. But
    					# such truncation only occurs on
    					# time-driven rotation, not on restarts
    					# or size-driven rotation. Default is
    					# off, meaning append to existing files
    					# in all cases.
    log_rotation_age = 1d			# Automatic rotation of logfiles will 
    					# happen after that time.  0 to 
    					# disable.
    log_rotation_size = 0			# Automatic rotation of logfiles will 
    					# happen after that much log
    					# output.  0 to disable.
     
    # These are relevant when logging to syslog:
    #syslog_facility = 'LOCAL0'
    #syslog_ident = 'postgres'
     
     
    # - When to Log -
     
    #client_min_messages = notice		# Values, in order of decreasing detail:
    					#   debug5
    					#   debug4
    					#   debug3
    					#   debug2
    					#   debug1
    					#   log
    					#   notice
    					#   warning
    					#   error
     
    #log_min_messages = debug1		# Values, in order of decreasing detail:
    					#   debug5
    					#   debug4
    					#   debug3
    					#   debug2
    					#   debug1
    					#   info
    					#   notice
    					#   warning
    					#   error
    					#   log
    					#   fatal
    					#   panic
     
    #log_error_verbosity = default		# terse, default, or verbose messages
     
    #log_min_error_statement =  debug1	# Values in order of increasing severity:
    				 	#   debug5
    					#   debug4
    					#   debug3
    					#   debug2
    					#   debug1
    				 	#   info
    					#   notice
    					#   warning
    					#   error
    					#   fatal
    					#   panic (effectively off)
     
    #log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
    					# and their durations.
     
    #silent_mode = off			# DO NOT USE without syslog or 
    					# redirect_stderr
    					# (change requires restart)
     
    # - What to Log -
     
    #debug_print_parse = on
    #debug_print_rewritten = on
    #debug_print_plan = on
    #debug_pretty_print = off
    #log_connections = off
    #log_disconnections = off
    #log_duration = off
    #log_line_prefix = ''			# Special values:
    					#   %u = user name
    					#   %d = database name
    					#   %r = remote host and port
    					#   %h = remote host
    					#   %p = PID
    					#   %t = timestamp (no milliseconds)
    					#   %m = timestamp with milliseconds
    					#   %i = command tag
    					#   %c = session id
    					#   %l = session line number
    					#   %s = session start timestamp
    					#   %x = transaction id
    					#   %q = stop here in non-session 
    					#        processes
    					#   %% = '%'
    					# e.g. '<%u%%%d> '
    #log_statement = 'all'			# none, ddl, mod, all
    #log_hostname = off
    Mon problème c'est que ça n'a aucun effet. J’ai beau redémarrer mon serveur, rien n'y fait.

    quelques chose m'a échappé ? Des suggestions ?

    Merci d'avance.

  2. #2
    Membre régulier
    Profil pro
    Inscrit en
    Février 2004
    Messages
    199
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 199
    Points : 96
    Points
    96
    Par défaut
    Le problème était en fin de compte assez simple (bête).

    J’vais oublier de dé commenté (enlever le #) debug_print_parse et les autres.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [SQL SERVER 2005] tracer l'exécution d'une requête
    Par AllyKo dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 14/05/2008, 09h10
  2. cherche aide pour améliorer le traitement d'une requête
    Par nomade333 dans le forum Requêtes et SQL.
    Réponses: 3
    Dernier message: 22/04/2008, 14h15
  3. Tracer les résultats d'une requête
    Par budtucker dans le forum PostgreSQL
    Réponses: 3
    Dernier message: 28/12/2007, 12h50
  4. Réponses: 3
    Dernier message: 28/02/2007, 18h46
  5. Réponses: 3
    Dernier message: 06/01/2006, 09h03

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo