This repository was archived by the owner on Mar 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhawq_toolkitReference.html
636 lines (560 loc) · 50.4 KB
/
hawq_toolkitReference.html
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine or request Chrome Frame -->
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<!-- REPLACE X WITH PRODUCT NAME -->
<title>hawq_toolkit Reference | Pivotal Docs</title>
<!-- Local CSS stylesheets -->
<link href="/stylesheets/master.css" media="screen,print" rel="stylesheet" type="text/css" />
<link href="/stylesheets/breadcrumbs.css" media="screen,print" rel="stylesheet" type="text/css" />
<link href="/stylesheets/search.css" media="screen,print" rel="stylesheet" type="text/css" />
<link href="/stylesheets/portal-style.css" media="screen,print" rel="stylesheet" type="text/css" />
<link href="/stylesheets/printable.css" media="print" rel="stylesheet" type="text/css" />
<!-- Confluence HTML stylesheet -->
<link href="/stylesheets/site-conf.css" media="screen,print" rel="stylesheet" type="text/css" />
<!-- Left-navigation code -->
<!-- http://www.designchemical.com/lab/jquery-vertical-accordion-menu-plugin/examples/# -->
<link href="/stylesheets/dcaccordion.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="/javascripts/jquery.cookie.js" type="text/javascript"></script>
<script src="/javascripts/jquery.hoverIntent.minified.js" type="text/javascript"></script>
<script src="/javascripts/jquery.dcjqaccordion.2.7.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function($){
$('#accordion-1').dcAccordion({
eventType: 'click',
autoClose: true,
saveState: true,
disableLink: false,
speed: 'fast',
classActive: 'test',
showCount: false
});
});
</script>
<link href="/stylesheets/grey.css" rel="stylesheet" type="text/css" />
<!-- End left-navigation code -->
<script src="/javascripts/all.js" type="text/javascript"></script>
<link href='http://www.gopivotal.com/misc/favicon.ico' rel='shortcut icon'>
<script type="text/javascript">
if (window.location.host === 'docs.gopivotal.com') {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-39702075-1']);
_gaq.push(['_setDomainName', 'gopivotal.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
}
</script>
</head>
<body class="pivotalcf pivotalcf_getstarted pivotalcf_getstarted_index">
<div class="viewport">
<div class="mobile-navigation--wrapper mobile-only">
<div class="navigation-drawer--container">
<div class="navigation-item-list">
<div class="navbar-link active">
<a href="http://gopivotal.com">
Home
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
<div class="navbar-link">
<a href="http://gopivotal.com/paas">
PaaS
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
<div class="navbar-link">
<a href="http://gopivotal.com/big-data">
Big Data
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
<div class="navbar-link">
<a href="http://gopivotal.com/agile">
Agile
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
<div class="navbar-link">
<a href="http://gopivotal.com/support">
Help & Support
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
<div class="navbar-link">
<a href="http://gopivotal.com/products">
Products
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
<div class="navbar-link">
<a href="http://gopivotal.com/solutions">
Solutions
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
<div class="navbar-link">
<a href="http://gopivotal.com/partners">
Partners
<i class="icon-chevron-right pull-right"></i>
</a>
</div>
</div>
</div>
<div class="mobile-nav">
<div class="nav-icon js-open-nav-drawer">
<i class="icon-reorder"></i>
</div>
<div class="header-center-icon">
<a href="http://gopivotal.com">
<div class="icon icon-pivotal-logo-mobile"></div>
</a>
</div>
</div>
</div>
<div class='wrap'>
<script src="//use.typekit.net/clb0qji.js" type="text/javascript"></script>
<script type="text/javascript">
try {
Typekit.load();
} catch (e) {
}
</script>
<script type="text/javascript">
document.domain = "gopivotal.com";
</script>
<script type="text/javascript">
WebFontConfig = {
google: { families: [ 'Source+Sans+Pro:300italic,400italic,600italic,300,400,600:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})(); </script>
<div id="search-dropdown-box">
<div class="search-dropdown--container js-search-dropdown">
<div class="container-fluid">
<div class="close-menu-large"><img src="http://www.gopivotal.com/sites/all/themes/gopo13/images/icon-close.png" /></div>
<div class="search-form--container">
<div class="form-search">
<div class='gcse-search'></div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="/javascripts/cse.js" type="text/javascript"></script>
</div>
</div>
</div>
</div>
</div>
<header class="navbar desktop-only" id="nav">
<div class="navbar-inner">
<div class="container-fluid">
<div class="pivotal-logo--container">
<a class="pivotal-logo" href="http://gopivotal.com"><span></span></a>
</div>
<ul class="nav pull-right">
<li class="navbar-link">
<a href="http://www.gopivotal.com/paas" id="paas-nav-link">PaaS</a>
</li>
<li class="navbar-link">
<a href="http://www.gopivotal.com/big-data" id="big-data-nav-link">BIG DATA</a>
</li>
<li class="navbar-link">
<a href="http://www.gopivotal.com/agile" id="agile-nav-link">AGILE</a>
</li>
<li class="navbar-link">
<a href="http://www.gopivotal.com/oss" id="oss-nav-link">OSS</a>
</li>
<li class="nav-search">
<a class="js-search-input-open" id="click-to-search"><span></span></a>
</li>
</ul>
</div>
<a href="http://www.gopivotal.com/contact">
<img id="get-started" src="http://www.gopivotal.com/sites/all/themes/gopo13/images/get-started.png">
</a>
</div>
</header>
<div class="main-wrap">
<div class="container-fluid">
<!-- Google CSE Search Box -->
<div id='docs-search'>
<gcse:search></gcse:search>
</div>
<div id='all-docs-link'>
<a href="http://docs.gopivotal.com/">All Documentation</a>
</div>
<div class="container">
<div id="sub-nav" class="nav-container">
<!-- Collapsible left-navigation-->
<ul class="accordion" id="accordion-1">
<!-- REPLACE <li/> NODES-->
<li>
<a href="index.html">Home</a></br>
<li>
<a href="PivotalHD.html">Pivotal HD 2.0.1</a>
<ul>
<li>
<a href="PHDEnterprise2.0.1ReleaseNotes.html">PHD Enterprise 2.0.1 Release Notes</a>
</li>
</ul>
<ul>
<li>
<a href="PHDInstallationandAdministration.html">PHD Installation and Administration</a>
<ul>
<li>
<a href="OverviewofPHD.html">Overview of PHD</a>
</li>
</ul>
<ul>
<li>
<a href="InstallationOverview.html">Installation Overview</a>
</li>
</ul>
<ul>
<li>
<a href="PHDInstallationChecklist.html">PHD Installation Checklist</a>
</li>
</ul>
<ul>
<li>
<a href="InstallingPHDUsingtheCLI.html">Installing PHD Using the CLI</a>
</li>
</ul>
<ul>
<li>
<a href="UpgradeChecklist.html">Upgrade Checklist</a>
</li>
</ul>
<ul>
<li>
<a href="UpgradingPHDUsingtheCLI.html">Upgrading PHD Using the CLI</a>
</li>
</ul>
<ul>
<li>
<a href="AdministeringPHDUsingtheCLI.html">Administering PHD Using the CLI</a>
</li>
</ul>
<ul>
<li>
<a href="PHDFAQFrequentlyAskedQuestions.html">PHD FAQ (Frequently Asked Questions)</a>
</li>
</ul>
<ul>
<li>
<a href="PHDTroubleshooting.html">PHD Troubleshooting</a>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<a href="StackandToolsReference.html">Stack and Tools Reference</a>
<ul>
<li>
<a href="OverviewofApacheStackandPivotalComponents.html">Overview of Apache Stack and Pivotal Components</a>
</li>
</ul>
<ul>
<li>
<a href="ManuallyInstallingPivotalHD2.0Stack.html">Manually Installing Pivotal HD 2.0 Stack</a>
</li>
</ul>
<ul>
<li>
<a href="ManuallyUpgradingPivotalHDStackfrom1.1.1to2.0.html">Manually Upgrading Pivotal HD Stack from 1.1.1 to 2.0</a>
</li>
</ul>
<ul>
<li>
<a href="PivotalHadoopEnhancements.html">Pivotal Hadoop Enhancements</a>
</li>
</ul>
<ul>
<li>
<a href="Security.html">Security</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="PivotalCommandCenter.html">Pivotal Command Center 2.2.1</a>
<ul>
<li>
<a href="PCC2.2.1ReleaseNotes.html">PCC 2.2.1 Release Notes</a>
</li>
</ul>
<ul>
<li>
<a href="PCCUserGuide.html">PCC User Guide</a>
<ul>
<li>
<a href="PCCOverview.html">PCC Overview</a>
</li>
</ul>
<ul>
<li>
<a href="PCCInstallationChecklist.html">PCC Installation Checklist</a>
</li>
</ul>
<ul>
<li>
<a href="InstallingPCC.html">Installing PCC</a>
</li>
</ul>
<ul>
<li>
<a href="UsingPCC.html">Using PCC</a>
</li>
</ul>
<ul>
<li>
<a href="CreatingaYUMEPELRepository.html">Creating a YUM EPEL Repository</a>
</li>
</ul>
<ul>
<li>
<a href="CommandLineReference.html">Command Line Reference</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="PivotalHAWQ.html">Pivotal HAWQ 1.2.0</a>
<ul>
<li>
<a href="HAWQ1.2.0.1ReleaseNotes.html">HAWQ 1.2.0.1 Release Notes</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQInstallationandUpgrade.html">HAWQ Installation and Upgrade</a>
<ul>
<li>
<a href="PreparingtoInstallHAWQ.html">Preparing to Install HAWQ</a>
</li>
</ul>
<ul>
<li>
<a href="InstallingHAWQ.html">Installing HAWQ</a>
</li>
</ul>
<ul>
<li>
<a href="InstallingtheHAWQComponents.html">Installing the HAWQ Components</a>
</li>
</ul>
<ul>
<li>
<a href="UpgradingHAWQandComponents.html">Upgrading HAWQ and Components</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQConfigurationParameterReference.html">HAWQ Configuration Parameter Reference</a>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<a href="HAWQAdministration.html">HAWQ Administration</a>
<ul>
<li>
<a href="HAWQOverview.html">HAWQ Overview</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQQueryProcessing.html">HAWQ Query Processing</a>
</li>
</ul>
<ul>
<li>
<a href="UsingHAWQtoQueryData.html">Using HAWQ to Query Data</a>
</li>
</ul>
<ul>
<li>
<a href="ConfiguringClientAuthentication.html">Configuring Client Authentication</a>
</li>
</ul>
<ul>
<li>
<a href="KerberosAuthentication.html">Kerberos Authentication</a>
</li>
</ul>
<ul>
<li>
<a href="ExpandingtheHAWQSystem.html">Expanding the HAWQ System</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQInputFormatforMapReduce.html">HAWQ InputFormat for MapReduce</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQFilespacesandHighAvailabilityEnabledHDFS.html">HAWQ Filespaces and High Availability Enabled HDFS</a>
</li>
</ul>
<ul>
<li>
<a href="SQLCommandReference.html">SQL Command Reference</a>
</li>
</ul>
<ul>
<li>
<a href="ManagementUtilityReference.html">Management Utility Reference</a>
</li>
</ul>
<ul>
<li>
<a href="ClientUtilityReference.html">Client Utility Reference</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQServerConfigurationParameters.html">HAWQ Server Configuration Parameters</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQEnvironmentVariables.html">HAWQ Environment Variables</a>
</li>
</ul>
<ul>
<li>
<a href="HAWQDataTypes.html">HAWQ Data Types</a>
</li>
</ul>
<ul>
<li>
<a href="SystemCatalogReference.html">System Catalog Reference</a>
</li>
</ul>
<ul>
<li>
<a href="hawq_toolkitReference.html">hawq_toolkit Reference</a>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<a href="PivotalExtensionFrameworkPXF.html">Pivotal Extension Framework (PXF)</a>
<ul>
<li>
<a href="PXFInstallationandAdministration.html">PXF Installation and Administration</a>
</li>
</ul>
<ul>
<li>
<a href="PXFExternalTableandAPIReference.html">PXF External Table and API Reference</a>
</li>
</ul>
</div><!--end of sub-nav-->
<h3 class="title-container">hawq_toolkit Reference</h3>
<div class="content">
<!-- Python script replaces main content -->
<div id ="main"><div style="visibility:hidden; height:2px;">Pivotal Product Documentation : hawq_toolkit Reference</div><div class="wiki-content group" id="main-content">
<p>This chapter describes the <em>hawq_toolkit</em> administrative schema views and their usage.</p><p><style type="text/css">/*<![CDATA[*/
div.rbtoc1400035796525 {padding: 0px;}
div.rbtoc1400035796525 ul {list-style: disc;margin-left: 0px;}
div.rbtoc1400035796525 li {margin-left: 0px;padding-left: 0px;}
/*]]>*/</style><div class="toc-macro rbtoc1400035796525">
<ul class="toc-indentation">
<li><a href="#hawq_toolkitReference-Whatishawq_toolkit?">What is hawq_toolkit?</a></li>
<li><a href="#hawq_toolkitReference-ViewingHAWQDatabaseServerLogFiles">Viewing HAWQ Database Server Log Files</a>
<ul class="toc-indentation">
<li><a href="#hawq_toolkitReference-hawq_log_command_timings">hawq_log_command_timings</a></li>
<li><a href="#hawq_toolkitReference-hawq_log_database">hawq_log_database</a></li>
<li><a href="#hawq_toolkitReference-hawq_log_master_concise">hawq_log_master_concise</a></li>
<li><a href="#hawq_toolkitReference-hawq_log_system">hawq_log_system</a></li>
</ul>
</li>
<li><a href="#hawq_toolkitReference-CheckingforTablesthatRequireRoutineMaintenance">Checking for Tables that Require Routine Maintenance</a>
<ul class="toc-indentation">
<li><a href="#hawq_toolkitReference-hawq_stats_missing">hawq_stats_missing</a></li>
</ul>
</li>
<li><a href="#hawq_toolkitReference-CheckingQueryDiskSpillSpaceUsage">Checking Query Disk Spill Space Usage</a>
<ul class="toc-indentation">
<li><a href="#hawq_toolkitReference-hawq_workfile_entries">hawq_workfile_entries</a></li>
<li><a href="#hawq_toolkitReference-hawq_workfile_usage_per_query">hawq_workfile_usage_per_query</a></li>
<li><a href="#hawq_toolkitReference-hawq_workfile_usage_per_segment">hawq_workfile_usage_per_segment</a></li>
</ul>
</li>
<li><a href="#hawq_toolkitReference-CheckingDatabaseObjectSizesandDiskSpace">Checking Database Object Sizes and Disk Space</a>
<ul class="toc-indentation">
<li><a href="#hawq_toolkitReference-hawq_size_of_table_disk">hawq_size_of_table_disk</a></li>
<li><a href="#hawq_toolkitReference-hawq_size_of_table_uncompressed">hawq_size_of_table_uncompressed</a></li>
<li><a href="#hawq_toolkitReference-hawq_size_of_table_and_indexes_disk">hawq_size_of_table_and_indexes_disk</a></li>
<li><a href="#hawq_toolkitReference-hawq_size_of_schema_disk">hawq_size_of_schema_disk</a></li>
<li><a href="#hawq_toolkitReference-hawq_size_of_table_and_indexes_licensing">hawq_size_of_table_and_indexes_licensing</a></li>
<li><a href="#hawq_toolkitReference-hawq_size_of_database">hawq_size_of_database</a></li>
</ul>
</li>
</ul>
</div></p><h2 id="hawq_toolkitReference-Whatishawq_toolkit?">What is hawq_toolkit?</h2><p><span style="line-height: 1.4285;background-color: transparent;">Pivotal provides an administrative schema called </span> <em style="line-height: 1.4285;background-color: transparent;">hawq_toolkit </em><span style="line-height: 1.4285;background-color: transparent;">that you can use to query the system catalogs, log files, and operating environment for system status information. The</span> <em style="line-height: 1.4285;background-color: transparent;"> hawq_toolkit </em><span style="line-height: 1.4285;background-color: transparent;">schema contains a number of views that you can access using SQL commands. The</span> <em style="line-height: 1.4285;background-color: transparent;"> hawq_toolkit </em><span style="line-height: 1.4285;background-color: transparent;">schema is accessible to all database users, although some objects may require superuser permissions. For convenience, you may want to add the </span> <em style="line-height: 1.4285;background-color: transparent;">hawq_toolkit </em><span style="line-height: 1.4285;background-color: transparent;">schema to your schema search path. For example:</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px;">=> ALTER ROLE myrole SET search_path TO my schema,hawq_toolkit;</pre>
</div></div><h2 id="hawq_toolkitReference-ViewingHAWQDatabaseServerLogFiles">Viewing HAWQ Database Server Log Files</h2><p>Each component of a HAWQ Database system (master, standby master and primary segments) keeps its own server log files, The hawq_log_* family of views allows you to issue SQL queries against the server log files to find particular entries of interest. The user of these views require superuser permissions.</p><h3 id="hawq_toolkitReference-hawq_log_command_timings">hawq_log_command_timings</h3><p>This view uses an external table to read the log files on the master and report the execution time of SQL commands executed in a database session. The user of this view requires superuser permissions.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd" colspan="1">logsession</td><td class="confluenceTd" colspan="1">The session identifier (prefixed with "con").</td></tr><tr><td class="confluenceTd" colspan="1">logcmdcount</td><td class="confluenceTd" colspan="1">The command number within a session (prefixed with "cmd").</td></tr><tr><td class="confluenceTd" colspan="1">logdatabase</td><td class="confluenceTd" colspan="1">The name of the database.</td></tr><tr><td class="confluenceTd" colspan="1">loguser</td><td class="confluenceTd" colspan="1">The name of the database user.</td></tr><tr><td class="confluenceTd" colspan="1">logpid</td><td class="confluenceTd" colspan="1">The process id (prefixed with "p").</td></tr><tr><td class="confluenceTd">logtimemin</td><td class="confluenceTd">The time of the first log message for this command.</td></tr><tr><td class="confluenceTd">logtimemax</td><td class="confluenceTd">The time of the last log message for this command.</td></tr><tr><td class="confluenceTd">logduration</td><td class="confluenceTd">Statement duration from start to end time.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_log_database">hawq_log_database</h3><p>This view uses an external table to read log files of the entire HAWQ system (master and segments) and lists log entries associated with the current database. Associated log entries can be identified by the session id (<em>logsession</em>) and command id (<em>logcmdcount</em>). The use of this view requires superuser permissions.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">logtime</td><td class="confluenceTd">The timestamp of the log message.</td></tr><tr><td class="confluenceTd">loguser</td><td class="confluenceTd">The name of the database user.</td></tr><tr><td class="confluenceTd">logdatabase</td><td class="confluenceTd">The name of the database.</td></tr><tr><td class="confluenceTd">logpid</td><td class="confluenceTd">The associated process id (prefixed with "p").</td></tr><tr><td class="confluenceTd" colspan="1">logthread</td><td class="confluenceTd" colspan="1">The associated thread count (prefixed with "th").</td></tr><tr><td class="confluenceTd" colspan="1">loghost</td><td class="confluenceTd" colspan="1">The segment or master host name.</td></tr><tr><td class="confluenceTd" colspan="1">logport</td><td class="confluenceTd" colspan="1">The segment or master port.</td></tr><tr><td class="confluenceTd" colspan="1">logsessiontime</td><td class="confluenceTd" colspan="1">Time session connection was opened.</td></tr><tr><td class="confluenceTd" colspan="1">logtransaction</td><td class="confluenceTd" colspan="1">Global transaction id.</td></tr><tr><td class="confluenceTd" colspan="1">logsession</td><td class="confluenceTd" colspan="1">The session identifier (prefixed with "con").</td></tr><tr><td class="confluenceTd" colspan="1">logcmdcount</td><td class="confluenceTd" colspan="1">The command number with in a session (prefixed with "cmd").</td></tr><tr><td class="confluenceTd" colspan="1">logsegment</td><td class="confluenceTd" colspan="1">The segment content identifier (prefixed with "seg". The master always has a content id of -1).</td></tr><tr><td class="confluenceTd" colspan="1">logslice</td><td class="confluenceTd" colspan="1">The slice id (portion of the query plan being executed).</td></tr><tr><td class="confluenceTd" colspan="1">logdistxact</td><td class="confluenceTd" colspan="1">Distributed transaction id.</td></tr><tr><td class="confluenceTd" colspan="1">loglocalxact</td><td class="confluenceTd" colspan="1">Local transaction id.</td></tr><tr><td class="confluenceTd" colspan="1">logsubxact</td><td class="confluenceTd" colspan="1">Sub<span>transaction</span> id.</td></tr><tr><td class="confluenceTd" colspan="1">logseverity</td><td class="confluenceTd" colspan="1">LOG, ERROR, FATAL, PANIC, DEBUG1 or DEBUG2.</td></tr><tr><td class="confluenceTd" colspan="1">logstate</td><td class="confluenceTd" colspan="1">SQL state code associated with the log message.</td></tr><tr><td class="confluenceTd" colspan="1">logmessage</td><td class="confluenceTd" colspan="1">Log or error message text.</td></tr><tr><td class="confluenceTd" colspan="1">logdetail</td><td class="confluenceTd" colspan="1">Detail message test associated with an error message.</td></tr><tr><td class="confluenceTd" colspan="1">loghint</td><td class="confluenceTd" colspan="1">Hint <span>message test associated with an error message.</span></td></tr><tr><td class="confluenceTd" colspan="1">logquery</td><td class="confluenceTd" colspan="1">The internally-generated query text.</td></tr><tr><td class="confluenceTd" colspan="1">logquerypos</td><td class="confluenceTd" colspan="1">The cursor index into the internally-generated query text.</td></tr><tr><td class="confluenceTd" colspan="1">logcontext</td><td class="confluenceTd" colspan="1">The context in which this message gets generated.</td></tr><tr><td class="confluenceTd" colspan="1">logdebug</td><td class="confluenceTd" colspan="1">Query string with full detail for debugging.</td></tr><tr><td class="confluenceTd" colspan="1">logcursorpos</td><td class="confluenceTd" colspan="1">The cursor index into the query string.</td></tr><tr><td class="confluenceTd" colspan="1">logfunction</td><td class="confluenceTd" colspan="1">The function in which this message is generated.</td></tr><tr><td class="confluenceTd" colspan="1">logfile</td><td class="confluenceTd" colspan="1">The log file in which this message is generated.</td></tr><tr><td class="confluenceTd" colspan="1">logline</td><td class="confluenceTd" colspan="1">The line in the log file in which this message is generated.</td></tr><tr><td class="confluenceTd" colspan="1">logstack</td><td class="confluenceTd" colspan="1">Full text of the stack trace associated with this message.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_log_master_concise">hawq_log_master_concise</h3><p>This view uses an external table to read a subset of the log fields from the master log files. The use of this view requires superuser permissions.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">logtime</td><td class="confluenceTd">The timestamp of the log message.</td></tr><tr><td class="confluenceTd">logdatabase</td><td class="confluenceTd">The name of the database.</td></tr><tr><td class="confluenceTd">logsession</td><td class="confluenceTd">The session identifier (prefixed with "con").</td></tr><tr><td class="confluenceTd">logcmdcount</td><td class="confluenceTd">The command number within a session (prefixed with "cmd").</td></tr><tr><td class="confluenceTd" colspan="1">logseverity</td><td class="confluenceTd" colspan="1">LOG, ERROR, FATAL, PANIC, DEBUG1, DEBUG2.</td></tr><tr><td class="confluenceTd" colspan="1">logmessage</td><td class="confluenceTd" colspan="1">Log or error message text.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_log_system">hawq_log_system</h3><p>This view uses an external table to read the server log files of the entire HAWQ system (master and segments) and lists all log entries. Associated log entries can be identified by session id (<em>logsession</em>) and command id (<em>logcmdcount</em>). The use of this view requires superuser permissions.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">logtime</td><td class="confluenceTd">The timestamp of the log message.</td></tr><tr><td class="confluenceTd">loguser</td><td class="confluenceTd">The name of the database user.</td></tr><tr><td class="confluenceTd">logdatabase</td><td class="confluenceTd">The name of the database.</td></tr><tr><td class="confluenceTd">logpid</td><td class="confluenceTd">The associated process id (prefixed with "p").</td></tr><tr><td class="confluenceTd" colspan="1">logthread</td><td class="confluenceTd" colspan="1">The associated thread count (prefixed with "th").</td></tr><tr><td class="confluenceTd" colspan="1">loghost</td><td class="confluenceTd" colspan="1">The segment or master host name.</td></tr><tr><td class="confluenceTd" colspan="1">logport</td><td class="confluenceTd" colspan="1">The segment or master port.</td></tr><tr><td class="confluenceTd" colspan="1">logsessiontime</td><td class="confluenceTd" colspan="1">Time session connection was opened.</td></tr><tr><td class="confluenceTd" colspan="1">logtransaction</td><td class="confluenceTd" colspan="1">Global transaction id.</td></tr><tr><td class="confluenceTd" colspan="1">logsession</td><td class="confluenceTd" colspan="1">The session identifier (prefixed with "con").</td></tr><tr><td class="confluenceTd" colspan="1">logcmdcount</td><td class="confluenceTd" colspan="1">The command number with in a session (prefixed with "cmd").</td></tr><tr><td class="confluenceTd" colspan="1">logsegment</td><td class="confluenceTd" colspan="1">The segment content identifier (prefixed with "seg". The master always has a content id of -1).</td></tr><tr><td class="confluenceTd" colspan="1">logslice</td><td class="confluenceTd" colspan="1">The slice id (portion of the query plan being executed).</td></tr><tr><td class="confluenceTd" colspan="1">logdistxact</td><td class="confluenceTd" colspan="1">Distributed transaction id.</td></tr><tr><td class="confluenceTd" colspan="1">loglocalxact</td><td class="confluenceTd" colspan="1">Local transaction id.</td></tr><tr><td class="confluenceTd" colspan="1">logsubxact</td><td class="confluenceTd" colspan="1">Subtransaction id.</td></tr><tr><td class="confluenceTd" colspan="1">logseverity</td><td class="confluenceTd" colspan="1">LOG, ERROR, FATAL, PANIC, DEBUG1 or DEBUG2.</td></tr><tr><td class="confluenceTd" colspan="1">logstate</td><td class="confluenceTd" colspan="1">SQL state code associated with the log message.</td></tr><tr><td class="confluenceTd" colspan="1">logmessage</td><td class="confluenceTd" colspan="1">Log or error message text.</td></tr><tr><td class="confluenceTd" colspan="1">logdetail</td><td class="confluenceTd" colspan="1">Detail message test associated with an error message.</td></tr><tr><td class="confluenceTd" colspan="1">loghint</td><td class="confluenceTd" colspan="1">Hint message test associated with an error message.</td></tr><tr><td class="confluenceTd" colspan="1">logquery</td><td class="confluenceTd" colspan="1">The internally-generated query text.</td></tr><tr><td class="confluenceTd" colspan="1">logquerypos</td><td class="confluenceTd" colspan="1">The cursor index into the internally-generated query text.</td></tr><tr><td class="confluenceTd" colspan="1">logcontext</td><td class="confluenceTd" colspan="1">The context in which this message gets generated.</td></tr><tr><td class="confluenceTd" colspan="1">logdebug</td><td class="confluenceTd" colspan="1">Query string with full detail for debugging.</td></tr><tr><td class="confluenceTd" colspan="1">logcursorpos</td><td class="confluenceTd" colspan="1">The cursor index into the query string.</td></tr><tr><td class="confluenceTd" colspan="1">logfunction</td><td class="confluenceTd" colspan="1">The function in which this message is generated.</td></tr><tr><td class="confluenceTd" colspan="1">logfile</td><td class="confluenceTd" colspan="1">The log file in which this message is generated.</td></tr><tr><td class="confluenceTd" colspan="1">logline</td><td class="confluenceTd" colspan="1">The line in the log file in which this message is generated.</td></tr><tr><td class="confluenceTd" colspan="1">logstack</td><td class="confluenceTd" colspan="1">Full text of the stack trace associated with this message.</td></tr></tbody></table></div><h2 id="hawq_toolkitReference-CheckingforTablesthatRequireRoutineMaintenance">Checking for Tables that Require Routine Maintenance</h2><h3 id="hawq_toolkitReference-hawq_stats_missing">hawq_stats_missing</h3><p>This view shows tables that do not have statistics and therefore may require an ANALYZE be run on the table.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">smischema</td><td class="confluenceTd">The schema name.</td></tr><tr><td class="confluenceTd">smitable</td><td class="confluenceTd">The table name.</td></tr><tr><td class="confluenceTd">smisize</td><td class="confluenceTd"><p>Does this table have statistics? False if the table does not have row count and row sizing statistics recorded</p><p>in the system catalog, which may indicated that the tables needs to be analyzed. This will also be false if the</p><p>table does not contain any rows. For example, parent tables of partitioned tables are always empty and will</p><p>always return a false result.</p></td></tr><tr><td class="confluenceTd">smicols</td><td class="confluenceTd">The number of columns in the table.</td></tr><tr><td class="confluenceTd">smirecs</td><td class="confluenceTd">The number of rows in the table.</td></tr></tbody></table></div><h2 id="hawq_toolkitReference-CheckingQueryDiskSpillSpaceUsage">Checking Query Disk Spill Space Usage</h2><p>The <em>hawq_workfile_* </em><span style="font-size: medium;"> </span>views show information about all the queries that are currently using disk spill space. HAWQ creates work files on disk if it does not have sufficient memory to execute the query in memory. This information can be used for troubleshooting and tuning queries. The information in the views can also be used to specify the values for the HAWQ Database configuration parameters hawq_workfile_limit_per_query and hawq_workfile_limit_per_segment.</p><h3 id="hawq_toolkitReference-hawq_workfile_entries">hawq_workfile_entries</h3><p>This view contains one row for each operator using disk space for workfiles on a segment at the current time. The view is accessible to all users, however non-superusers only to see information for the databases that they have permission to access.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Type</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">command_cnt</td><td class="confluenceTd">integer </td><td class="confluenceTd">Command ID of the query. </td></tr><tr><td class="confluenceTd">content </td><td class="confluenceTd">smallint </td><td class="confluenceTd">The content identifier for a segment instance. </td></tr><tr><td class="confluenceTd">current_query </td><td class="confluenceTd">text </td><td class="confluenceTd">Current query that the process is running. </td></tr><tr><td class="confluenceTd">datname </td><td class="confluenceTd">name </td><td class="confluenceTd">HAWQ database name. </td></tr><tr><td class="confluenceTd">directory </td><td class="confluenceTd">text </td><td class="confluenceTd">Path to the work file .</td></tr><tr><td class="confluenceTd">optype </td><td class="confluenceTd">text </td><td class="confluenceTd">The query operator type that created the work file. </td></tr><tr><td class="confluenceTd">procpid </td><td class="confluenceTd">integer </td><td class="confluenceTd">Process ID of the server process. </td></tr><tr><td class="confluenceTd">sess_id </td><td class="confluenceTd">integer </td><td class="confluenceTd">Session ID. </td></tr><tr><td class="confluenceTd">size </td><td class="confluenceTd">bigint </td><td class="confluenceTd">The size of thework file in bytes. </td></tr><tr><td class="confluenceTd">numfiles </td><td class="confluenceTd">bigint </td><td class="confluenceTd">The number of files created. </td></tr><tr><td class="confluenceTd">slice </td><td class="confluenceTd">smallint </td><td class="confluenceTd">The query plan slice. The portion of the query plan that is being executed. </td></tr><tr><td class="confluenceTd">state </td><td class="confluenceTd">text </td><td class="confluenceTd">The state of the query that created the work file. </td></tr><tr><td class="confluenceTd">usename </td><td class="confluenceTd">name </td><td class="confluenceTd">Role name. </td></tr><tr><td class="confluenceTd">workmem </td><td class="confluenceTd">integer </td><td class="confluenceTd">The amount of memory allocated to the operator in KB. </td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_workfile_usage_per_query">hawq_workfile_usage_per_query</h3><p>This view contains one row for each operator using disk space for workfiles on a segment at the current time. The view is accessible to all users, however non-superusers only to see information for the databases that they have permission to access.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Type</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">command_cnt</td><td class="confluenceTd">integer</td><td class="confluenceTd">Command ID of the query.</td></tr><tr><td class="confluenceTd">content</td><td class="confluenceTd">smallint</td><td class="confluenceTd">The content identifier for a segment instance.</td></tr><tr><td class="confluenceTd">current_query</td><td class="confluenceTd">text</td><td class="confluenceTd">Current query that the process is running.</td></tr><tr><td class="confluenceTd">datname</td><td class="confluenceTd">name</td><td class="confluenceTd">HAWQ database name</td></tr><tr><td class="confluenceTd">procpid</td><td class="confluenceTd">integer</td><td class="confluenceTd">Process ID of the server process.</td></tr><tr><td class="confluenceTd">sess_id</td><td class="confluenceTd">integer</td><td class="confluenceTd">Session ID.</td></tr><tr><td class="confluenceTd">size</td><td class="confluenceTd">bigint</td><td class="confluenceTd">The size of the work file in bytes.</td></tr><tr><td class="confluenceTd">numflies</td><td class="confluenceTd">bigint</td><td class="confluenceTd">The number of files created.</td></tr><tr><td class="confluenceTd">state</td><td class="confluenceTd">text</td><td class="confluenceTd">The state of the query that created the work file</td></tr><tr><td class="confluenceTd" colspan="1">usename </td><td class="confluenceTd" colspan="1">name </td><td class="confluenceTd" colspan="1"> Role name. </td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_workfile_usage_per_segment">hawq_workfile_usage_per_segment</h3><p>This view contains one row for each segment. Each row displays the total amount of disk space used for workfiles on the segment at the current time. The view is accessible to all users, however non-superusers only to see information for the databases that they have permission to access.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Type</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">content</td><td class="confluenceTd">smallint</td><td class="confluenceTd">The content identifier for a segment instance.</td></tr><tr><td class="confluenceTd">size</td><td class="confluenceTd">bigint</td><td class="confluenceTd">The total size of the work files on a segment.</td></tr><tr><td class="confluenceTd">numflies</td><td class="confluenceTd">bigint</td><td class="confluenceTd">The number of files created.</td></tr></tbody></table></div><p><span style="font-size: medium;"> </span></p><h2 id="hawq_toolkitReference-CheckingDatabaseObjectSizesandDiskSpace">Checking Database Object Sizes and Disk Space</h2><h3 id="hawq_toolkitReference-hawq_size_of_table_disk">hawq_size_of_table_disk</h3><p>This view shows the size of a table on disk. This view is accessible to all users, however non-superusers will only be able to see tables that they have permissions to access.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">sotdoid</td><td class="confluenceTd">The object ID of the table.</td></tr><tr><td class="confluenceTd">sotdsize</td><td class="confluenceTd"><p>The total size of the table in bytes (main relation, plus oversized (toast) attributes, plus additional storage objects</p><p>for AO tables.</p></td></tr><tr><td class="confluenceTd">sotdtoastsize</td><td class="confluenceTd">The size of the TOAST table (oversized attribute storage), if there is one.</td></tr><tr><td class="confluenceTd">sotdadditionalsize</td><td class="confluenceTd">Reflects the segment and block directory table sizes for append-only (AO) tables.</td></tr><tr><td class="confluenceTd">sotdschemaname</td><td class="confluenceTd">The schema name.</td></tr><tr><td class="confluenceTd">sotdtablename</td><td class="confluenceTd">The table name.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_size_of_table_uncompressed">hawq_size_of_table_uncompressed</h3><p>This view shows the uncompressed table size for append-only (AO) tables. Otherwise, the table size on disk is shown. The use of this view requires superuser permissions.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">sotuoid</td><td class="confluenceTd">The object ID of the table.</td></tr><tr><td class="confluenceTd">sotusize</td><td class="confluenceTd">The uncompressed size of the table in bytes if it is a compressed AO table. Otherwise, the table size on disk.</td></tr><tr><td class="confluenceTd">sotuschemaname</td><td class="confluenceTd">The schema name.</td></tr><tr><td class="confluenceTd">sotutablename</td><td class="confluenceTd">The table name.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_size_of_table_and_indexes_disk">hawq_size_of_table_and_indexes_disk</h3><p>This view shows the size on disk of tables and their indexes. This view is accessible to all users, however non-superusers will only be able to see relations that they have permissions to access.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">sotaidoid</td><td class="confluenceTd">The object ID of the parent table.</td></tr><tr><td class="confluenceTd">sotaidtablesize</td><td class="confluenceTd">The disk size of the table.</td></tr><tr><td class="confluenceTd">sotaididsize</td><td class="confluenceTd">The total size of all indexes on the table.</td></tr><tr><td class="confluenceTd">sotaidschemaname</td><td class="confluenceTd">The name of the schema.</td></tr><tr><td class="confluenceTd">sotaidtablename</td><td class="confluenceTd">The name of the table.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_size_of_schema_disk">hawq_size_of_schema_disk</h3><p>This view shows schema sizes for the schemas in the current database. This view is accessible to all users, however non-superusers will only be able to see schemas that they have permissions to access.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">sosdnsp</td><td class="confluenceTd">The name of the schema.</td></tr><tr><td class="confluenceTd">sosdschematablesize</td><td class="confluenceTd">The total size of tables in the schema in bytes.</td></tr><tr><td class="confluenceTd">sosdschemaidxsize</td><td class="confluenceTd">The total size of indexes in the schema in bytes.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_size_of_table_and_indexes_licensing">hawq_size_of_table_and_indexes_licensing</h3><p>This view shows the total size of tables and their indexes for licensing purposes. The use of this view requires superuser permissions.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">sotailoid</td><td class="confluenceTd">The object ID of the table.</td></tr><tr><td class="confluenceTd">sotailtablesizedisk</td><td class="confluenceTd">The total disk size of the table.</td></tr><tr><td class="confluenceTd">sotailtablesizeuncompressed</td><td class="confluenceTd"><p>If the table is a compressed append-only table, shows the uncompressed table</p><p>size in bytes.</p></td></tr><tr><td class="confluenceTd">sotailindexessize</td><td class="confluenceTd">The total sizeof all indexes in the table.</td></tr><tr><td class="confluenceTd">sotailschemaname</td><td class="confluenceTd">The schema name.</td></tr><tr><td class="confluenceTd">sotailtablename</td><td class="confluenceTd">The table name.</td></tr></tbody></table></div><h3 id="hawq_toolkitReference-hawq_size_of_database">hawq_size_of_database</h3><p>This view shows the total size of a database. This view is accessible to all users, however non-superusers will only be able to see databases that they have permissions to access.</p><p>Note: In HAWQ, the data of a database consists of data stored in the local storage of the master, and data stored in HDFS. When the HDFS is online, the sodddatsize includes the sizes of both two kinds of data; while the HDFS is offline, the sodddatsize only includes the size of data stored in the local storage of the master.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Column</th><th class="confluenceTh">Description</th></tr><tr><td class="confluenceTd">sodddatname</td><td class="confluenceTd">The name of the database.</td></tr><tr><td class="confluenceTd">sodddatsize</td><td class="confluenceTd">The size of the database in bytes.</td></tr></tbody></table></div>
</div></div>
</div><!-- end of content-->
</div><!-- end of container -->
</div><!--end of container-fluid-->
</div><!--end of main-wrap-->
<div class="site-footer desktop-only">
<div class="container-fluid">
<div class="site-footer-links">
<span class="version"><a href='/'>Pivotal Documentation</a></span>
<span>©
<script>
var d = new Date();
document.write(d.getFullYear());
</script>
<a href='http://gopivotal.com'>Pivotal Software</a> Inc. All Rights Reserved.
</span>
</div>
</div>
</div>
<script type="text/javascript">
(function() {
var didInit = false;
function initMunchkin() {
if(didInit === false) {
didInit = true;
Munchkin.init('625-IUJ-009');
}
}
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = document.location.protocol + '//munchkin.marketo.net/munchkin.js';
s.onreadystatechange = function() {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
initMunchkin();
}
};
s.onload = initMunchkin;
document.getElementsByTagName('head')[0].appendChild(s);
})();
</script>
</div><!--end of viewport-->
<div id="scrim"></div>
</body>
</html>