How show command works internally in teradata?
When we run show command it lists the object definition. I believe it will query the dictionary tables and rebuild .
Could you help us to understand how it queries the internal tables?
teradata
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
When we run show command it lists the object definition. I believe it will query the dictionary tables and rebuild .
Could you help us to understand how it queries the internal tables?
teradata
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Show what, exactly? Is this the CLI client? I've never heard of aSHOW
orDESCRIBE
that rebulids anything. I think that PostgreSQL's client has an option that lets you do something like this. Please give the (exact) command you are running and the result yiu hope to obtain.
– Vérace
Jun 9 '18 at 11:03
When we use show command to get the DDL of the object. ex: show table db.tablename; show view db.viewname; I am trying to understand how show table results the DDL and what tables it is querying to get the output.
– user153083
Jun 11 '18 at 4:38
add a comment |
When we run show command it lists the object definition. I believe it will query the dictionary tables and rebuild .
Could you help us to understand how it queries the internal tables?
teradata
When we run show command it lists the object definition. I believe it will query the dictionary tables and rebuild .
Could you help us to understand how it queries the internal tables?
teradata
teradata
asked Jun 9 '18 at 4:59
user153083user153083
1
1
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 11 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Show what, exactly? Is this the CLI client? I've never heard of aSHOW
orDESCRIBE
that rebulids anything. I think that PostgreSQL's client has an option that lets you do something like this. Please give the (exact) command you are running and the result yiu hope to obtain.
– Vérace
Jun 9 '18 at 11:03
When we use show command to get the DDL of the object. ex: show table db.tablename; show view db.viewname; I am trying to understand how show table results the DDL and what tables it is querying to get the output.
– user153083
Jun 11 '18 at 4:38
add a comment |
Show what, exactly? Is this the CLI client? I've never heard of aSHOW
orDESCRIBE
that rebulids anything. I think that PostgreSQL's client has an option that lets you do something like this. Please give the (exact) command you are running and the result yiu hope to obtain.
– Vérace
Jun 9 '18 at 11:03
When we use show command to get the DDL of the object. ex: show table db.tablename; show view db.viewname; I am trying to understand how show table results the DDL and what tables it is querying to get the output.
– user153083
Jun 11 '18 at 4:38
Show what, exactly? Is this the CLI client? I've never heard of a
SHOW
or DESCRIBE
that rebulids anything. I think that PostgreSQL's client has an option that lets you do something like this. Please give the (exact) command you are running and the result yiu hope to obtain.– Vérace
Jun 9 '18 at 11:03
Show what, exactly? Is this the CLI client? I've never heard of a
SHOW
or DESCRIBE
that rebulids anything. I think that PostgreSQL's client has an option that lets you do something like this. Please give the (exact) command you are running and the result yiu hope to obtain.– Vérace
Jun 9 '18 at 11:03
When we use show command to get the DDL of the object. ex: show table db.tablename; show view db.viewname; I am trying to understand how show table results the DDL and what tables it is querying to get the output.
– user153083
Jun 11 '18 at 4:38
When we use show command to get the DDL of the object. ex: show table db.tablename; show view db.viewname; I am trying to understand how show table results the DDL and what tables it is querying to get the output.
– user153083
Jun 11 '18 at 4:38
add a comment |
1 Answer
1
active
oldest
votes
For a SHOW TABLE the parser actually creates the CREATE TABLE based on the current definition.
But for SHOW VIEW, etc. it's retrieving the CREATE from dbc.TablesV.RequestText
. If the source code is larger than 12.5 KB RequestTxtOverFlow
is set and the remainder is found in one or more 32 KB chunks in dbc.TextTbl
.
For SHOW PROCEDURE it's different, this returns the internally stored sorce code (unless the SP is created with the NOSPL
option), there's no way to access this info using a Select.
Thanks for the answer. For Requesttext column in dbc.tablesv for views and dbc.tvm for tables returns the text of the most recent data definition statement If you perform alter on view or table at that time requesttext column returns alter statement.show command still shows the DDL instead of alter. It will considers the data of requesttext column and does some internal operations / manipulations on dictionary tables and gets the data. Not sure how exactly it works.
– user153083
Jun 11 '18 at 4:32
As I wrote: for Tables the parser creates the DDL (this info is returned by the Resolver accessing the metadata stored in the Table Header on each AMP), but for views, etc. it's in RequestText.
– dnoeth
Jun 11 '18 at 5:57
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f209174%2fhow-show-command-works-internally-in-teradata%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
For a SHOW TABLE the parser actually creates the CREATE TABLE based on the current definition.
But for SHOW VIEW, etc. it's retrieving the CREATE from dbc.TablesV.RequestText
. If the source code is larger than 12.5 KB RequestTxtOverFlow
is set and the remainder is found in one or more 32 KB chunks in dbc.TextTbl
.
For SHOW PROCEDURE it's different, this returns the internally stored sorce code (unless the SP is created with the NOSPL
option), there's no way to access this info using a Select.
Thanks for the answer. For Requesttext column in dbc.tablesv for views and dbc.tvm for tables returns the text of the most recent data definition statement If you perform alter on view or table at that time requesttext column returns alter statement.show command still shows the DDL instead of alter. It will considers the data of requesttext column and does some internal operations / manipulations on dictionary tables and gets the data. Not sure how exactly it works.
– user153083
Jun 11 '18 at 4:32
As I wrote: for Tables the parser creates the DDL (this info is returned by the Resolver accessing the metadata stored in the Table Header on each AMP), but for views, etc. it's in RequestText.
– dnoeth
Jun 11 '18 at 5:57
add a comment |
For a SHOW TABLE the parser actually creates the CREATE TABLE based on the current definition.
But for SHOW VIEW, etc. it's retrieving the CREATE from dbc.TablesV.RequestText
. If the source code is larger than 12.5 KB RequestTxtOverFlow
is set and the remainder is found in one or more 32 KB chunks in dbc.TextTbl
.
For SHOW PROCEDURE it's different, this returns the internally stored sorce code (unless the SP is created with the NOSPL
option), there's no way to access this info using a Select.
Thanks for the answer. For Requesttext column in dbc.tablesv for views and dbc.tvm for tables returns the text of the most recent data definition statement If you perform alter on view or table at that time requesttext column returns alter statement.show command still shows the DDL instead of alter. It will considers the data of requesttext column and does some internal operations / manipulations on dictionary tables and gets the data. Not sure how exactly it works.
– user153083
Jun 11 '18 at 4:32
As I wrote: for Tables the parser creates the DDL (this info is returned by the Resolver accessing the metadata stored in the Table Header on each AMP), but for views, etc. it's in RequestText.
– dnoeth
Jun 11 '18 at 5:57
add a comment |
For a SHOW TABLE the parser actually creates the CREATE TABLE based on the current definition.
But for SHOW VIEW, etc. it's retrieving the CREATE from dbc.TablesV.RequestText
. If the source code is larger than 12.5 KB RequestTxtOverFlow
is set and the remainder is found in one or more 32 KB chunks in dbc.TextTbl
.
For SHOW PROCEDURE it's different, this returns the internally stored sorce code (unless the SP is created with the NOSPL
option), there's no way to access this info using a Select.
For a SHOW TABLE the parser actually creates the CREATE TABLE based on the current definition.
But for SHOW VIEW, etc. it's retrieving the CREATE from dbc.TablesV.RequestText
. If the source code is larger than 12.5 KB RequestTxtOverFlow
is set and the remainder is found in one or more 32 KB chunks in dbc.TextTbl
.
For SHOW PROCEDURE it's different, this returns the internally stored sorce code (unless the SP is created with the NOSPL
option), there's no way to access this info using a Select.
answered Jun 9 '18 at 21:33
dnoethdnoeth
3,746612
3,746612
Thanks for the answer. For Requesttext column in dbc.tablesv for views and dbc.tvm for tables returns the text of the most recent data definition statement If you perform alter on view or table at that time requesttext column returns alter statement.show command still shows the DDL instead of alter. It will considers the data of requesttext column and does some internal operations / manipulations on dictionary tables and gets the data. Not sure how exactly it works.
– user153083
Jun 11 '18 at 4:32
As I wrote: for Tables the parser creates the DDL (this info is returned by the Resolver accessing the metadata stored in the Table Header on each AMP), but for views, etc. it's in RequestText.
– dnoeth
Jun 11 '18 at 5:57
add a comment |
Thanks for the answer. For Requesttext column in dbc.tablesv for views and dbc.tvm for tables returns the text of the most recent data definition statement If you perform alter on view or table at that time requesttext column returns alter statement.show command still shows the DDL instead of alter. It will considers the data of requesttext column and does some internal operations / manipulations on dictionary tables and gets the data. Not sure how exactly it works.
– user153083
Jun 11 '18 at 4:32
As I wrote: for Tables the parser creates the DDL (this info is returned by the Resolver accessing the metadata stored in the Table Header on each AMP), but for views, etc. it's in RequestText.
– dnoeth
Jun 11 '18 at 5:57
Thanks for the answer. For Requesttext column in dbc.tablesv for views and dbc.tvm for tables returns the text of the most recent data definition statement If you perform alter on view or table at that time requesttext column returns alter statement.show command still shows the DDL instead of alter. It will considers the data of requesttext column and does some internal operations / manipulations on dictionary tables and gets the data. Not sure how exactly it works.
– user153083
Jun 11 '18 at 4:32
Thanks for the answer. For Requesttext column in dbc.tablesv for views and dbc.tvm for tables returns the text of the most recent data definition statement If you perform alter on view or table at that time requesttext column returns alter statement.show command still shows the DDL instead of alter. It will considers the data of requesttext column and does some internal operations / manipulations on dictionary tables and gets the data. Not sure how exactly it works.
– user153083
Jun 11 '18 at 4:32
As I wrote: for Tables the parser creates the DDL (this info is returned by the Resolver accessing the metadata stored in the Table Header on each AMP), but for views, etc. it's in RequestText.
– dnoeth
Jun 11 '18 at 5:57
As I wrote: for Tables the parser creates the DDL (this info is returned by the Resolver accessing the metadata stored in the Table Header on each AMP), but for views, etc. it's in RequestText.
– dnoeth
Jun 11 '18 at 5:57
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f209174%2fhow-show-command-works-internally-in-teradata%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Show what, exactly? Is this the CLI client? I've never heard of a
SHOW
orDESCRIBE
that rebulids anything. I think that PostgreSQL's client has an option that lets you do something like this. Please give the (exact) command you are running and the result yiu hope to obtain.– Vérace
Jun 9 '18 at 11:03
When we use show command to get the DDL of the object. ex: show table db.tablename; show view db.viewname; I am trying to understand how show table results the DDL and what tables it is querying to get the output.
– user153083
Jun 11 '18 at 4:38