Sybase IQ 12.4.0 Changes to Using join indexes Adaptive Server IQ, Id custid idlname

Page 26

Changes to “Using join indexes”

Adaptive Server IQ 12.4.0

If the join column is made up of more than one column, the combination of the values must be unique. For example, in the asiqdemo database, the id in the customer table and the cust_id in the sales_order table each contain a customer ID. The customer table contains one row for each customer and, therefore, has a unique value in the id column in each row. The sales_order table contains one row for each transaction a customer has made. Presumably, there are many transactions for each customer, so there are multiple rows in the sales_order table with the same value in the cust_id column.

So, if you join customer.id to sales_order.cust_id, the join relationship is one- to-many. As you can see in the following example, for every row in customer, there are potentially many matching rows in sales_order.

select sales_order.id, sales_order.cust_id, customer.lname

from sales_order, customer

where sales_order.cust_id = customer

id cust_id idlname

2583,101,101,’Devlin’

2001,101,101,’Devlin’

2005,101,101,’Devlin’

2125,101,101,’Devlin’

2206,101,101,’Devlin’

2279,101,101,’Devlin’

2295,101,101,’Devlin’

2002,102,102,’Reiser’

2142,102,102,’Reiser’

2318,102,102,’Reiser’

2338,102,102,’Reiser’

2449,102,102,’Reiser’

2562,102,102,’Reiser’

2585,102,102,’Reiser’

2340,103,103,’Niedringhaus’

2451,103,103,’Niedringhaus’

2564,103,103,’Niedringhaus’

2587,103,103,’Niedringhaus’

2003,103,103,’Niedringhaus’

2178,103,103,’Niedringhaus’

2207,103,103,’Niedringhaus’

2307,103,103,’Niedringhaus’

Warning! If the one-to-many relationship is incorrect, the join cannot be synchronized until you remove the extra rows from the “one” table. If you try to synchronize, you get a Duplicate Row error, and the transaction rolls back.

26

Release Bulletin for Digital UNIX

Image 26
Contents Release Bulletin Adaptive Server IQ For Digital Unix Product summaryRequired Operating System Patches Required Operating System Patches Adaptive Server IQRelease Bulletin for Digital Unix RestrictionsAdaptive Server IQ Converting 12.0.x databases to Following outer join format is supported Documentation for this version Installation InstructionsSetting the Ldlibrarypath Environment Variable Obtaining query plans Accessing Current Release Bulletin InformationSpecial migration instructions Go to support.sybase.comChanged functionality in this version Changed functionality in Adaptive Server IQImproved stored procedure output Adaptive Server IQ Known problems Adaptive Server IQ Stopasiq utilityAdaptive Server IQ Queries Temporary tables in proceduresData definition 1 ANY, SOME, and ALL subquery supportOutput to file in Dbisql Adaptive Server IQ OperationsLarge in subqueries Changing length of Dbisql column valuesUnsupported terminal types cause Dbisql error User-defined variable issueDbspawn Error when starting a server User-defined variable issue Adaptive Server IQAdd Service utility installed only with Server Components Problems with Add User-defined Data Type wizardDSE not installed on Windows client systems Notification message setting omitted from Index PropertiesStartup, shutdown, and connection Documentation updates and clarificationsProduct compatibilities Data Type column in Table Editor retains focusAdditions to the startasiq or asiqsrv12 command-line options Specifying server switchesUsing -v switch on 64-bit platforms Gm command line optionGn command-line option Gm command line option Adaptive Server IQAdaptive Server IQ Confirming connections Using Odbc connectivity with UnixConfirming connections Stopasiq utility Using a .odbc.ini fileUsing a .odbc.ini file Adaptive Server IQ Addition to Stop Database statement Adaptive Server IQ Addition to Stop Database statementError in Dbstop example Adaptive Server IQ Error in Dbstop exampleConfiguration files do not accept quotes Disconnect details omittedData definition DDL Switch must be uppercaseAdaptive Server IQ Switch must be uppercase Change to Create Database statementJoint Virtual Table JVT definition LowDisk functions as HighGroupColumn Limit Correction IQ database file paths must be uniqueError on Create Dbspace Error documenting IQ PathError in raw partition limit Adaptive Server IQ Error documenting IQ PathSize clause of Create Dbspace Adaptive Server IQ Size clause of Create DbspaceAddition to Drop Database statement Adaptive Server IQ Recommended index types Changes to Using join indexesRecommended index types Changes to Using join indexes Adaptive Server IQ Id custid idlnameAdaptive Server IQ Changes to Using join indexes Error in Diskstriping default Data manipulation DMLAdaptive Server IQ Default Support for joins between stores or databasesNew and changed general database options New and changed general database options Adaptive Server IQAdaptive Server IQ Description InsertnumberrowsperrawiobufferCorrections to Insert Location Description Adaptive Server IQNumber* function not supported String function Repeat is supportedCorrection to Char function Adaptive Server IQ String function Repeat is supportedUsing Isnull and Coalesce Adaptive Server IQ Backup and system administrationUsing Isnull and Coalesce New options for reserving spaceChange to error message Insufficient disk spaceForced recovery and leaked space recovery Effect of checkpoints Adaptive Server IQStorage within the database as in use Dbccoption option Spiqcheckdb Set dbccoption to 2, as a temporary option Improved output in stored procedures New Stored Procedure ColumnsTransaction Log utility Minpasswordlength optionSpiqstatus now displays IQ Page Size Maintaining a transaction log or mirror Grant Connect for existing user ID Error message for buffer cache settingsSetting PrefetchBufferLimit option Documentation on Data Backup and Recovery Dropping users may delete tablesChanges to Backup statement Cleaning up after abnormal exitMonitoring server activity Client applications Using PC client applicationsCreating attribute tables for PowerBuilder Help filesTechnical Support Adaptive Server IQ plug-in help reflects Multiplex supportOther sources of information Sybase Certifications on the WebTechinfo.sybase.com