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:    [email protected]
Twitter:  @CarolP222
---------------------------------------------------------------

On Tue, Feb 2, 2016 at 10:59 AM, Carol Pearson <[email protected]>
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:    [email protected]
> Twitter:  @CarolP222
> ---------------------------------------------------------------
>
> On Tue, Feb 2, 2016 at 10:13 AM, Anoop Sharma <[email protected]>
> 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:[email protected]]
>> *Sent:* Tuesday, February 2, 2016 10:12 AM
>> *To:* [email protected]
>> *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:    [email protected]
>>
>> Twitter:  @CarolP222
>>
>> ---------------------------------------------------------------
>>
>
>

Reply via email to