You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@trafodion.apache.org by Carol Pearson <ca...@gmail.com> on 2016/02/02 19:11:30 UTC

Basic Is-it-working? Test

Hi Trafodion Fans,

I wrote a little one-minute acid test script to make sure that my Trafodion
basic piece-parts are in working order before doing more complex testing.
Whenever I do an installation or an sqstart after changing configuration, I
run this script just to make sure that nothing is horribly broken.  If I
get errors, I know there's no point in going further because something
basic went wrong.

-------------------------------------------
--
--  Acid test script to make sure SQL has installed
--
------------------------------------------

create schema test_sandbox_schema;

set schema test_sandbox_schema;

create table t (c1 int not null, c2 int not null, primary key (c1));

insert into t values (1,1);
insert into t values (2,3);
insert into t values (3,2);
begin work;
insert into t values (4,5);
insert into t values (5,2);
commit work;

insert into t values (7,3);

select * from t order by c2;

create index tix on t (c2);

create view tview as select c1, c2 from t where c2 > 3;

select * from tview where c2 < 3;
select * from tview where c2 > 2;

update statistics on t;

explain select * from t order by c2;
select * from t order by c2;

drop view tview;
drop table t;
drop schema test_sandbox_schema;




I put emphasis on sorting and indexes because of my long history with those
(old habits die hard). And my goal is only basic success (no errors) and I
don't mind repeating the same query multiple times and I do expect the same
results.... I don't want a huge complex script and automated validation
(those come next, depending on what I'm trying to do).  Really, my goal is
to get a fast warm fuzzy feeling that it's worth it for me to actually do
real work.

Anyone have suggestions on other things I might  check as part of a simple,
less than one-minute test?  Is this (incredibly basic) script worth
contributing to Trafodion?

Thanks!
-Carol P.

---------------------------------------------------------------
Email:    carol.pearson234@gmail.com
Twitter:  @CarolP222
---------------------------------------------------------------

Re: Basic Is-it-working? Test

Posted by Carol Pearson <ca...@gmail.com>.
Yep, issue was the update stats command - needs to be "for" not "on".  I
thought I copied the right version, but apparently not. That's why source
control is a handy thing....

Thanks Anoop!

-Carol P.

---------------------------------------------------------------
Email:    carol.pearson234@gmail.com
Twitter:  @CarolP222
---------------------------------------------------------------

On Tue, Feb 2, 2016 at 10:59 AM, Carol Pearson <ca...@gmail.com>
wrote:

> Shoot, now I'm gonna have to go check whether I cut and pasted the right
> one... The one I used most recently didn't have any syntax errors in it....
>
> -Carol P.
>
> ---------------------------------------------------------------
> Email:    carol.pearson234@gmail.com
> Twitter:  @CarolP222
> ---------------------------------------------------------------
>
> On Tue, Feb 2, 2016 at 10:13 AM, Anoop Sharma <an...@esgyn.com>
> wrote:
>
>> hey
>>
>> did you run this script? Coz there is a syntax error in it.
>>
>> Now run it and find out which stmt has  syntax error J
>>
>> anoop
>>
>>
>>
>> *From:* Carol Pearson [mailto:carol.pearson234@gmail.com]
>> *Sent:* Tuesday, February 2, 2016 10:12 AM
>> *To:* user@trafodion.apache.org
>> *Subject:* Basic Is-it-working? Test
>>
>>
>>
>> Hi Trafodion Fans,
>>
>>
>>
>> I wrote a little one-minute acid test script to make sure that my
>> Trafodion basic piece-parts are in working order before doing more complex
>> testing.  Whenever I do an installation or an sqstart after changing
>> configuration, I run this script just to make sure that nothing is horribly
>> broken.  If I get errors, I know there's no point in going further because
>> something basic went wrong.
>>
>>
>>
>> -------------------------------------------
>>
>> --
>>
>> --  Acid test script to make sure SQL has installed
>>
>> --
>>
>> ------------------------------------------
>>
>>
>>
>> create schema test_sandbox_schema;
>>
>>
>>
>> set schema test_sandbox_schema;
>>
>>
>>
>> create table t (c1 int not null, c2 int not null, primary key (c1));
>>
>>
>>
>> insert into t values (1,1);
>>
>> insert into t values (2,3);
>>
>> insert into t values (3,2);
>>
>> begin work;
>>
>> insert into t values (4,5);
>>
>> insert into t values (5,2);
>>
>> commit work;
>>
>>
>>
>> insert into t values (7,3);
>>
>>
>>
>> select * from t order by c2;
>>
>>
>>
>> create index tix on t (c2);
>>
>>
>>
>> create view tview as select c1, c2 from t where c2 > 3;
>>
>>
>>
>> select * from tview where c2 < 3;
>>
>> select * from tview where c2 > 2;
>>
>>
>>
>> update statistics on t;
>>
>>
>>
>> explain select * from t order by c2;
>>
>> select * from t order by c2;
>>
>>
>>
>> drop view tview;
>>
>> drop table t;
>>
>> drop schema test_sandbox_schema;
>>
>>
>>
>>
>>
>>
>>
>> I put emphasis on sorting and indexes because of my long history with
>> those (old habits die hard). And my goal is only basic success (no errors)
>> and I don't mind repeating the same query multiple times and I do expect
>> the same results.... I don't want a huge complex script and automated
>> validation (those come next, depending on what I'm trying to do).  Really,
>> my goal is to get a fast warm fuzzy feeling that it's worth it for me to
>> actually do real work.
>>
>>
>>
>> Anyone have suggestions on other things I might  check as part of a
>> simple, less than one-minute test?  Is this (incredibly basic) script worth
>> contributing to Trafodion?
>>
>>
>>
>> Thanks!
>>
>> -Carol P.
>>
>>
>> ---------------------------------------------------------------
>>
>> Email:    carol.pearson234@gmail.com
>>
>> Twitter:  @CarolP222
>>
>> ---------------------------------------------------------------
>>
>
>

Re: Basic Is-it-working? Test

Posted by Carol Pearson <ca...@gmail.com>.
Shoot, now I'm gonna have to go check whether I cut and pasted the right
one... The one I used most recently didn't have any syntax errors in it....

-Carol P.

---------------------------------------------------------------
Email:    carol.pearson234@gmail.com
Twitter:  @CarolP222
---------------------------------------------------------------

On Tue, Feb 2, 2016 at 10:13 AM, Anoop Sharma <an...@esgyn.com>
wrote:

> hey
>
> did you run this script? Coz there is a syntax error in it.
>
> Now run it and find out which stmt has  syntax error J
>
> anoop
>
>
>
> *From:* Carol Pearson [mailto:carol.pearson234@gmail.com]
> *Sent:* Tuesday, February 2, 2016 10:12 AM
> *To:* user@trafodion.apache.org
> *Subject:* Basic Is-it-working? Test
>
>
>
> Hi Trafodion Fans,
>
>
>
> I wrote a little one-minute acid test script to make sure that my
> Trafodion basic piece-parts are in working order before doing more complex
> testing.  Whenever I do an installation or an sqstart after changing
> configuration, I run this script just to make sure that nothing is horribly
> broken.  If I get errors, I know there's no point in going further because
> something basic went wrong.
>
>
>
> -------------------------------------------
>
> --
>
> --  Acid test script to make sure SQL has installed
>
> --
>
> ------------------------------------------
>
>
>
> create schema test_sandbox_schema;
>
>
>
> set schema test_sandbox_schema;
>
>
>
> create table t (c1 int not null, c2 int not null, primary key (c1));
>
>
>
> insert into t values (1,1);
>
> insert into t values (2,3);
>
> insert into t values (3,2);
>
> begin work;
>
> insert into t values (4,5);
>
> insert into t values (5,2);
>
> commit work;
>
>
>
> insert into t values (7,3);
>
>
>
> select * from t order by c2;
>
>
>
> create index tix on t (c2);
>
>
>
> create view tview as select c1, c2 from t where c2 > 3;
>
>
>
> select * from tview where c2 < 3;
>
> select * from tview where c2 > 2;
>
>
>
> update statistics on t;
>
>
>
> explain select * from t order by c2;
>
> select * from t order by c2;
>
>
>
> drop view tview;
>
> drop table t;
>
> drop schema test_sandbox_schema;
>
>
>
>
>
>
>
> I put emphasis on sorting and indexes because of my long history with
> those (old habits die hard). And my goal is only basic success (no errors)
> and I don't mind repeating the same query multiple times and I do expect
> the same results.... I don't want a huge complex script and automated
> validation (those come next, depending on what I'm trying to do).  Really,
> my goal is to get a fast warm fuzzy feeling that it's worth it for me to
> actually do real work.
>
>
>
> Anyone have suggestions on other things I might  check as part of a
> simple, less than one-minute test?  Is this (incredibly basic) script worth
> contributing to Trafodion?
>
>
>
> Thanks!
>
> -Carol P.
>
>
> ---------------------------------------------------------------
>
> Email:    carol.pearson234@gmail.com
>
> Twitter:  @CarolP222
>
> ---------------------------------------------------------------
>

RE: Basic Is-it-working? Test

Posted by Anoop Sharma <an...@esgyn.com>.
hey

did you run this script? Coz there is a syntax error in it.

Now run it and find out which stmt has  syntax error J

anoop



*From:* Carol Pearson [mailto:carol.pearson234@gmail.com]
*Sent:* Tuesday, February 2, 2016 10:12 AM
*To:* user@trafodion.apache.org
*Subject:* Basic Is-it-working? Test



Hi Trafodion Fans,



I wrote a little one-minute acid test script to make sure that my Trafodion
basic piece-parts are in working order before doing more complex testing.
Whenever I do an installation or an sqstart after changing configuration, I
run this script just to make sure that nothing is horribly broken.  If I
get errors, I know there's no point in going further because something
basic went wrong.



-------------------------------------------

--

--  Acid test script to make sure SQL has installed

--

------------------------------------------



create schema test_sandbox_schema;



set schema test_sandbox_schema;



create table t (c1 int not null, c2 int not null, primary key (c1));



insert into t values (1,1);

insert into t values (2,3);

insert into t values (3,2);

begin work;

insert into t values (4,5);

insert into t values (5,2);

commit work;



insert into t values (7,3);



select * from t order by c2;



create index tix on t (c2);



create view tview as select c1, c2 from t where c2 > 3;



select * from tview where c2 < 3;

select * from tview where c2 > 2;



update statistics on t;



explain select * from t order by c2;

select * from t order by c2;



drop view tview;

drop table t;

drop schema test_sandbox_schema;







I put emphasis on sorting and indexes because of my long history with those
(old habits die hard). And my goal is only basic success (no errors) and I
don't mind repeating the same query multiple times and I do expect the same
results.... I don't want a huge complex script and automated validation
(those come next, depending on what I'm trying to do).  Really, my goal is
to get a fast warm fuzzy feeling that it's worth it for me to actually do
real work.



Anyone have suggestions on other things I might  check as part of a simple,
less than one-minute test?  Is this (incredibly basic) script worth
contributing to Trafodion?



Thanks!

-Carol P.


---------------------------------------------------------------

Email:    carol.pearson234@gmail.com

Twitter:  @CarolP222

---------------------------------------------------------------

Re: Basic Is-it-working? Test

Posted by Carol Pearson <ca...@gmail.com>.
Thanks Dave!

I often use the regression tests as well, but that's my second step, after
I've validated that Trafodion seems to be working..  My acid test is a
simple trafci and then I obey this file.  That has a couple fewer moving
parts than the regression tests.

By the time I get sqstart + traf/sql ci + acid test run, I've exercised a
lot of the trafodion piece parts in 3 very simple commands:

sqstart
trafci
trafci>> obey acidtest;

Plus, this will work if I've just used the execution binaries - I'm not
sure everyone now and forever should have the whole regression suite.

-Carol P.



---------------------------------------------------------------
Email:    carol.pearson234@gmail.com
Twitter:  @CarolP222
---------------------------------------------------------------

On Tue, Feb 2, 2016 at 10:20 AM, Dave Birdsall <da...@esgyn.com>
wrote:

> Hi Carol,
>
>
>
> As a developer, I often use the developer regression suite, fullstack2,
> for this purpose. It is just three tests, and runs fairly quickly. That
> said, I don’t know how easy it is for an end-user (who is not a developer)
> to use.
>
>
>
> Dave
>
>
>
> *From:* Carol Pearson [mailto:carol.pearson234@gmail.com]
> *Sent:* Tuesday, February 2, 2016 10:12 AM
> *To:* user@trafodion.apache.org
> *Subject:* Basic Is-it-working? Test
>
>
>
> Hi Trafodion Fans,
>
>
>
> I wrote a little one-minute acid test script to make sure that my
> Trafodion basic piece-parts are in working order before doing more complex
> testing.  Whenever I do an installation or an sqstart after changing
> configuration, I run this script just to make sure that nothing is horribly
> broken.  If I get errors, I know there's no point in going further because
> something basic went wrong.
>
>
>
> -------------------------------------------
>
> --
>
> --  Acid test script to make sure SQL has installed
>
> --
>
> ------------------------------------------
>
>
>
> create schema test_sandbox_schema;
>
>
>
> set schema test_sandbox_schema;
>
>
>
> create table t (c1 int not null, c2 int not null, primary key (c1));
>
>
>
> insert into t values (1,1);
>
> insert into t values (2,3);
>
> insert into t values (3,2);
>
> begin work;
>
> insert into t values (4,5);
>
> insert into t values (5,2);
>
> commit work;
>
>
>
> insert into t values (7,3);
>
>
>
> select * from t order by c2;
>
>
>
> create index tix on t (c2);
>
>
>
> create view tview as select c1, c2 from t where c2 > 3;
>
>
>
> select * from tview where c2 < 3;
>
> select * from tview where c2 > 2;
>
>
>
> update statistics on t;
>
>
>
> explain select * from t order by c2;
>
> select * from t order by c2;
>
>
>
> drop view tview;
>
> drop table t;
>
> drop schema test_sandbox_schema;
>
>
>
>
>
>
>
> I put emphasis on sorting and indexes because of my long history with
> those (old habits die hard). And my goal is only basic success (no errors)
> and I don't mind repeating the same query multiple times and I do expect
> the same results.... I don't want a huge complex script and automated
> validation (those come next, depending on what I'm trying to do).  Really,
> my goal is to get a fast warm fuzzy feeling that it's worth it for me to
> actually do real work.
>
>
>
> Anyone have suggestions on other things I might  check as part of a
> simple, less than one-minute test?  Is this (incredibly basic) script worth
> contributing to Trafodion?
>
>
>
> Thanks!
>
> -Carol P.
>
>
> ---------------------------------------------------------------
>
> Email:    carol.pearson234@gmail.com
>
> Twitter:  @CarolP222
>
> ---------------------------------------------------------------
>

RE: Basic Is-it-working? Test

Posted by Dave Birdsall <da...@esgyn.com>.
Hi Carol,



As a developer, I often use the developer regression suite, fullstack2, for
this purpose. It is just three tests, and runs fairly quickly. That said, I
don’t know how easy it is for an end-user (who is not a developer) to use.



Dave



*From:* Carol Pearson [mailto:carol.pearson234@gmail.com]
*Sent:* Tuesday, February 2, 2016 10:12 AM
*To:* user@trafodion.apache.org
*Subject:* Basic Is-it-working? Test



Hi Trafodion Fans,



I wrote a little one-minute acid test script to make sure that my Trafodion
basic piece-parts are in working order before doing more complex testing.
Whenever I do an installation or an sqstart after changing configuration, I
run this script just to make sure that nothing is horribly broken.  If I
get errors, I know there's no point in going further because something
basic went wrong.



-------------------------------------------

--

--  Acid test script to make sure SQL has installed

--

------------------------------------------



create schema test_sandbox_schema;



set schema test_sandbox_schema;



create table t (c1 int not null, c2 int not null, primary key (c1));



insert into t values (1,1);

insert into t values (2,3);

insert into t values (3,2);

begin work;

insert into t values (4,5);

insert into t values (5,2);

commit work;



insert into t values (7,3);



select * from t order by c2;



create index tix on t (c2);



create view tview as select c1, c2 from t where c2 > 3;



select * from tview where c2 < 3;

select * from tview where c2 > 2;



update statistics on t;



explain select * from t order by c2;

select * from t order by c2;



drop view tview;

drop table t;

drop schema test_sandbox_schema;







I put emphasis on sorting and indexes because of my long history with those
(old habits die hard). And my goal is only basic success (no errors) and I
don't mind repeating the same query multiple times and I do expect the same
results.... I don't want a huge complex script and automated validation
(those come next, depending on what I'm trying to do).  Really, my goal is
to get a fast warm fuzzy feeling that it's worth it for me to actually do
real work.



Anyone have suggestions on other things I might  check as part of a simple,
less than one-minute test?  Is this (incredibly basic) script worth
contributing to Trafodion?



Thanks!

-Carol P.


---------------------------------------------------------------

Email:    carol.pearson234@gmail.com

Twitter:  @CarolP222

---------------------------------------------------------------