| Function | Specification |
|---|---|
| cosine_distance() | Computes the cosine distance between two vectors. It maps to vector_distance(v1, v2, COSINE) function of Oracle AI Vector Search. |
| l1_distance() | Alias for the taxicab_distance() function below. |
| taxicab_distance() | Computes the taxicab distance between two vectors. It maps aps to vector_distance(v1, v2, MANHATTAN) function for Oracle AI Vector Search. |
| l2_distance() | Alias for the euclidean_distance() function below. |
| euclidean_distance() | Computes the euclidean distance between two vectors. It maps to vector_distance(v1, v2, EUCLIDEAN) function of Oracle AI Vector Search. |
| inner_product() | Computes the inner product between two vectors. It maps to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Copyright (c) 2024, Oracle and/or its affiliates. | |
| This software is dual-licensed to you under the Universal Permissive License | |
| (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License | |
| 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose | |
| either license. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. |
| Name | Type | Description |
|---|---|---|
| id | VARCHAR(36) | Primary key. Used to store UUID strings which are generated when the embedding store |
| embedding | VECTOR(*, FLOAT32) | Stores the embedding |
| text | CLOB | Stores the text segment |
| metadata | JSON | Stores the metadata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Copyright (c) 2024, Oracle and/or its affiliates. | |
| This software is dual-licensed to you under the Universal Permissive License | |
| (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License | |
| 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose | |
| either license. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Copyright (c) 2024, Oracle and/or its affiliates. | |
| This software is dual-licensed to you under the Universal Permissive License | |
| (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License | |
| 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose | |
| either license. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| https://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spring.datasource.url=<YOUR_JDBC_CONNECTION_URL> | |
| spring.datasource.username=<YOUR_DB_USERNAME> | |
| spring.datasource.password=<YOUR_DB_PASSWORD> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spring.datasource.type=oracle.ucp.jdbc.PoolDataSource | |
| spring.datasource.oracleucp.connection-pool-name=connectionPoolName1 | |
| spring.datasource.oracleucp.initial-pool-size=1 | |
| spring.datasource.oracleucp.min-pool-size=1 | |
| spring.datasource.oracleucp.max-pool-size=2 | |
| spring.datasource.oracleucp.connection-factory-class-name=oracle.jdbc.pool.OracleDataSource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HikariCP metrics | UCP Metrics | |
|---|---|---|
| Number of active connections | BorrowedConnectionsCount | |
| Number of pending connection requests | PendingRequestsCount | |
| Total number of timed-out requests | CumulativeFailedConnectionWaitCount | |
| Time taken to get a connection | PeakConnectionWaitTime / AverageConnectionWaitTime | |
| Current total number of connections | TotalConnectionsCount | |
| Number of idle connections | AvailableConnectionsCount | |
| Max number of connections | PeakConnectionsCount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UCP Knob | Description | |
|---|---|---|
| UCP[XA]ConnectionBuilder.user().password() or PoolDataSource.getConnection(user + password) | UCP's single pool can hold connections from more than one database accounts and can borrow a connection to a given account. | |
| UCP[XA]ConnectionBuilder.shardingKey().superShardingKey() | It is possible to establish a connection with a given sharding key/super key. | |
| UCP[XA]ConnectionBuilder.connectionWaitTimeout() or UCP[XA]ConnectionBuilder.connectionWaitDuration() | UCP can set connection wait timeout (either in seconds or in Duration - supporting milliseconds) for a separate borrow request as well as for a whole PoolDataSource. | |
| UCP[XA]ConnectionBuilder.service() | It is possible to borrow a connection to a selected database service (a pool can hold connections from different services. | |
| UCP[XA]ConnectionBuilder..labels() or PoolDataSource.getConnection(labels) | UCP connections can be labeled and per-label connection cost can be assigned. Then a connection can be borrowed based on its label(s) and cost. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HikariCP | Comments | |
|---|---|---|
| autoCommit | Use Oracle JDBC driver connection property autoCommit. | |
| registerMbeans | UCP always attempts registration. | |
| threadFactory | UCP supports setTaskManager instead (setter API only). | |
| scheduledExecutor | UCP supports setTaskManager instead (setter API only). | |
| keepaliveTime | Closest is to use driver connection properties oracle.net.keepAlive + oracle.net.TCP_KEEPIDLE which apply to all connections borrowed/available. The HikariCP property applies only to idle/available connections and uses isValid/query to keep alive. Another option is to add async validation in UCP for available connections. | |
| minimumIdle | Controls the minimum number of idle connections HikariCP tries to maintain in the pool. |
NewerOlder