From user-return-686-apmail-trafodion-user-archive=trafodion.apache.org@trafodion.incubator.apache.org Mon Sep 12 14:10:49 2016 Return-Path: X-Original-To: apmail-trafodion-user-archive@minotaur.apache.org Delivered-To: apmail-trafodion-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 254B0190F2 for ; Mon, 12 Sep 2016 14:10:49 +0000 (UTC) Received: (qmail 62328 invoked by uid 500); 12 Sep 2016 14:10:48 -0000 Delivered-To: apmail-trafodion-user-archive@trafodion.apache.org Received: (qmail 62287 invoked by uid 500); 12 Sep 2016 14:10:48 -0000 Mailing-List: contact user-help@trafodion.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@trafodion.incubator.apache.org Delivered-To: mailing list user@trafodion.incubator.apache.org Received: (qmail 62276 invoked by uid 99); 12 Sep 2016 14:10:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2016 14:10:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 73C39C059C for ; Mon, 12 Sep 2016 14:10:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.2 X-Spam-Level: * X-Spam-Status: No, score=1.2 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=esgyn.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id QyxYAYxBC2JR for ; Mon, 12 Sep 2016 14:10:44 +0000 (UTC) Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 978065FD39 for ; Mon, 12 Sep 2016 14:10:44 +0000 (UTC) Received: by mail-pf0-f169.google.com with SMTP id g202so52991780pfb.0 for ; Mon, 12 Sep 2016 07:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=esgyn.com; s=google; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :thread-index:content-language; bh=tvBkIvjSVxQiPwZ1Hjgs7Yeg420cg1mC7VPdRwdRuWw=; b=UJTnhe2ELhP1IIqfZoaapOkwG0TSxtKXKBKwb9YQRFtAU/OeFAYCrgE6OaoVHEbEOe fCdOnorvzcocgSLyru0HyZpvR4B35Z4ZxPCv/TOPI/kmEr8YxBJAfHSMDNYDAzfQmCQC eEOBDuzJyyF34gxja6DhhjViLoNOTotcNPwC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:thread-index:content-language; bh=tvBkIvjSVxQiPwZ1Hjgs7Yeg420cg1mC7VPdRwdRuWw=; b=fncixfXb1UsVkXCoPlqJqZksJ8xDg/KpXVAo4V1mcy3rIS2oWBeBEdFVbnyh8nvUid KuNdI+g6cc7PaMB5uTYKWlTZLxu9LCzxlTdWbcwsyFBLzR2q9l53lZ4LJRUpq/ThQbl3 zXORXGp83pAU5x0ndkAaSPralopLl0eRSx6Hob/cR6+RB+A+aKnOR1k9NNoSNqreVAzs kcjxsNXB7P5nG5GUWM6RyuO9rE7cSkEDvip0tRoI7zw6GK8I8xmPhdbPCpBBBH2V1Vzb YU96dbfjOgig3cGDwKayhrLX3X/FPLtnKaYbAyv8xG7vcwSeNrfv3hcXneRTJEN8B9aU JG4A== X-Gm-Message-State: AE9vXwMR6I/XgNlQ3396o9tkRtHtHp7INYA6cB5PjXBFIZHh3UF3uMFvoi47vWrmjrPHXYIx X-Received: by 10.98.58.195 with SMTP id v64mr31323194pfj.97.1473689437979; Mon, 12 Sep 2016 07:10:37 -0700 (PDT) Received: from DESKTOPLV5D144 (c-98-234-120-109.hsd1.ca.comcast.net. [98.234.120.109]) by smtp.googlemail.com with ESMTPSA id p73sm13972314pfj.35.2016.09.12.07.10.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Sep 2016 07:10:37 -0700 (PDT) From: "Anoop Sharma" To: , References: In-Reply-To: Subject: RE: command Date: Mon, 12 Sep 2016 07:10:34 -0700 Message-ID: <002401d20cff$6edeba90$4c9c2fb0$@esgyn.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01D20CC4.C284C490" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQDH1CvRG6cAvFykFLqq1Schx/hKdgHthKmtonroe0A= Content-Language: en-us This is a multipart message in MIME format. ------=_NextPart_000_0025_01D20CC4.C284C490 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit one can also use traf metadata tables view to get this info. select row_data_length, row_total_length from "_MD_".tables_view where schema_name = 'your-sch' and table_name = 'your-tab'; row_data_length: length of row for the data part of table. This is the sum of lengths of all columns in the table plus 1 byte per nullable col. row_total_length: in addition to row_data_length, this includes hbase overhead for each stored hbase cell/column and includes key length, timestamp and column family length. If table is created as an aligned format table, this hbase overhead is minimal as all columns are packed and stored as one cell. anoop -----Original Message----- From: Liu, Ming (Ming) [mailto:ming.liu@esgyn.cn] Sent: Monday, September 12, 2016 2:49 AM To: user@trafodion.incubator.apache.org; dev Subject: RE: command Hi, Forling, You can try to search in the system metadata, here is an example select ROW_TOTAL_LENGTH , ROW_DATA_LENGTH from "_MD_".tables , "_MD_".objects where “_MD_”.objects.OBJECT_UID = “_MD_”.tables.table_uid and objects.OBJECT_NAME='your_table_name’; and you can check other columns in the “_MD_”.tables to see if there are other info you need. Others may have better approach, since I heard there are some new defined system dictionary and views. Or maybe some new utility to grab these information. But above query is one method. Thanks, Ming From: Dido_vansa [mailto:523766410@qq.com] Sent: Monday, September 12, 2016 2:52 PM To: user >; dev > Subject: command Hi! I have a problem about sql command in trafodion . I want to obtain row length in a table , but I do not understand which command I can use in this case. I'm looking forward to your reply Best regards, Forling ------=_NextPart_000_0025_01D20CC4.C284C490 Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable RE: command

one = can also use traf metadata tables view to get this = info.

  select row_data_length, row_total_length from = "_MD_".tables_view where schema_name =3D 'your-sch' and = table_name =3D 'your-tab';

row_data_length: length of row for the data part = of table. This is the sum of lengths of all columns in the table plus 1 = byte per nullable col.

row_total_length: in addition to = row_data_length, this includes hbase overhead for each stored hbase = cell/column and

         &n= bsp;          includes key length, = timestamp and = column family length.

         &n= bsp;          If table is = created as an aligned format table, this hbase overhead is minimal as = all columns are packed and stored as one cell.

anoop

-----Original Message-----
From: Liu, Ming (Ming) [mailto:ming.liu@esgyn.cn]
Sent: Monday, September 12, 2016 2:49 AM
To: user@trafodion.incubator.apache.org; dev = <dev@trafodion.incubator.apache.org>
Subject: RE: command

Hi, = Forling,

You can try to = search in the system metadata, here is an example

select = ROW_TOTAL_LENGTH , ROW_DATA_LENGTH from "_MD_".tables , = "_MD_".objects where = =1B$B!H=1B(J_MD_=1B$B!I=1B(J.objects.OBJECT_UID =3D = =1B$B!H=1B(J_MD_=1B$B!I=1B(J.tables.table_uid and = objects.OBJECT_NAME=3D'your_table_name=1B$B!G=1B(J;

and you can = check other columns in the =1B$B!H=1B(J_MD_=1B$B!I=1B(J.tables to see if = there are other info you need.

Others may have = better approach, since I heard there are some new defined system = dictionary and views. Or maybe some new utility to grab these = information. But above query is one method.

Thanks,

Ming

From: = Dido_vansa [mailto:523766410@qq.com]

Sent: Monday, = September 12, 2016 2:52 PM

To: user = <user@trafodion.incubator.apache.org>; dev <dev@trafodion.incubator.apache.org>

Subject: = command

Hi=1B$B!*=1B(J

I have a = problem about sql command in trafodion .

I want to = obtain row length in a table , but I do not understand which command I = can use in this case.

I'm looking = forward to your reply


Best = regards=1B$B!$=1B(J

Forling

------=_NextPart_000_0025_01D20CC4.C284C490--