Home | Previous Page | Next Page   Configuring and Monitoring Dynamic Server > Configuration Parameters > VPCLASS >

Creating a User-Defined Class

The VPCLASS configuration parameter also allows you to create a class of user-defined virtual processors (VPs). A user-defined class of VPs can run ill-behaved user-defined routines (UDRs).

Warning:
Execution of an ill-behaved routine in the CPU VP can cause serious interference with the operation of the database server. In addition, the routine itself might not produce correct results.

For more information on ill-behaved UDRs, see user-defined classes of virtual processors, in the chapter on virtual processors in the IBM Informix Administrator's Guide.

You might want to describe a user-defined class of virtual processors to run DataBlade or user-defined routines. The following example creates the user-defined class new, for which the database server starts three virtual processors initially:

VPCLASS new,num=3

At a later time, you can use onmode -p to add virtual processors to the class. The following command adds three virtual processors to the new class:

onmode -p +3 new

Tip:
When you create a user-defined routine or function, you use the CLASS parameter of the CREATE FUNCTION statement to assign it to a class of virtual processors. You must ensure that the name of the user-defined class agrees with the name that you assigned in the CREATE FUNCTION statement. If you try to use a function that refers to a user-defined class, that class must exist and have virtual processors assigned to it. If the class does not have any virtual processors, you receive an SQL error.

For more information on how to assign a user-defined routine to either CPU or user-defined classes of virtual processors, refer to IBM Informix User-Defined Routines and Data Types Developer's Guide. For more information on the syntax of the CREATE FUNCTION or CREATE PROCEDURE statement, refer to the IBM Informix Guide to SQL: Syntax.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]