Choose Language Hide Translation Bar
Highlighted
robot
Level VI

<< Select Where (for Fast Execution)

I would like to select missing rows of a data table using the << Select Where function (so that they can be deleted).  My problem is that this seems to take a very long time for large data tables.  Is there a faster way to execute this?  I am using JMP11.  Thanks!

// Selecting Missing Columns.

Names Default To Here( 1 );

t1 = Tick Seconds();

dt = New Table( "1000000 Rows", Add Rows( 1000000 ),

      New Column( "Hello!", Character, Nominal, Values( {"Hi!"} ) ),

      New Column( "Good Bye!", Character, Nominal, Values( {"", "Bye!"} ) )

);

dt << Select Where( Is Missing( As Column( "Hello!" ) ) & Is Missing( As Column( "Good Bye!" ) ) );

t2 = Tick Seconds();

Print( Concat( Char( t2 - t1 ), " seconds." ) );

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
ms
Super User ms
Super User

Re: << Select Where (for Fast Execution)

For large tables it can be faster to select rows via a summary table.

Try this:

t1 = Tick Seconds();

dt = New Table( "1000000 Rows", Add Rows( 1000000 ),

      New Column( "Hello!", Character, Nominal, Values( {"Hi!"} ) ),

      New Column( "Good Bye!", Character, Nominal, Values( {"", "Bye!"} ) )

);

dtsum = dt << Summary(Group(:Name("Hello!"), :Name("Good Bye!")), invisible);

dtsum << select rows(1);

Close(dtsum, no save);

t2 = Tick Seconds();

Print(Concat(Char(t2 - t1), " seconds."));


View solution in original post

2 REPLIES 2
Highlighted
ms
Super User ms
Super User

Re: << Select Where (for Fast Execution)

For large tables it can be faster to select rows via a summary table.

Try this:

t1 = Tick Seconds();

dt = New Table( "1000000 Rows", Add Rows( 1000000 ),

      New Column( "Hello!", Character, Nominal, Values( {"Hi!"} ) ),

      New Column( "Good Bye!", Character, Nominal, Values( {"", "Bye!"} ) )

);

dtsum = dt << Summary(Group(:Name("Hello!"), :Name("Good Bye!")), invisible);

dtsum << select rows(1);

Close(dtsum, no save);

t2 = Tick Seconds();

Print(Concat(Char(t2 - t1), " seconds."));


View solution in original post

Highlighted
robot
Level VI

Re: << Select Where (for Fast Execution)

Thanks again, MS!

Article Labels

    There are no labels assigned to this post.