Hi. Is there a way to set up logging in a way that I can see queries which trigger seq scans? Or to log queries "taking longer than xx ms"? Background is, that it is nearly impossible to tell, which queries are used in my applications as they are mostly generated by the frameworks. Yesterday I found, that one of the more often used queries has not used an existing index and I had to use another index for it. Nobody complained about the performance but nevertheless the query took about 1000ms and therefore slowed down the rest of the server ... cug -- PharmaLine, Essen, GERMANY Software and Database Development
am 07.03.2006, um 11:59:18 +0100 mailte Guido Neitzer folgendes: > Hi. > > Is there a way to set up logging in a way that I can see queries which > trigger seq scans? Or to log queries "taking longer than xx ms"? Yes, of cource. You can define log_min_duration_statement = 100 to log all queries taking longer 100 ms. Btw.: visit our new PostgreSQL User Group Deutschland - Homepage: http://pgug.de HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47215, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe ===
On 07.03.2006, at 12:11 Uhr, A. Kretschmer wrote: > Yes, of cource. You can define > > log_min_duration_statement = 100 > > to log all queries taking longer 100 ms. Thanks. cug -- PharmaLine, Essen, GERMANY Software and Database Development
Guido Neitzer wrote: > Hi. > > Is there a way to set up logging in a way that I can see queries which > trigger seq scans? Or to log queries "taking longer than xx ms"? The second is straightforward. See the "log_min_duration_statement" setting in the "logging" section of the manuals. -- Richard Huxton Archonet Ltd
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера