DB2 - Problembeschreibung
Problem IC98507 | Status: Geschlossen |
PERFORMANCE MAY BE SLOW FOR SOME QUERIES USING DB2GSE.ST_INTERSECTS | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problembeschreibung: | |
Spatial queries using a spatial constructor experience unexpectedly slow performance when run with small amounts of data. This is due to the compile time when the spatial value is constructed using the well-known text constructor. An example query is: SELECT id FROM my_table WHERE db2gse.ST_Intersects(location, db2gse.ST_Polygon('polygon ((0 0, 10 0, 10 10, 0 10, 0 0))', 1003)) = 1" | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to Version 10.1 Fix Pack 4 * **************************************************************** | |
Local-Fix: | |
1) Rewrite the query, for example, to put the spatial constructor in a common table expression. For the example query, rewrite like: WITH temp(geom) AS ( VALUES (db2gse.ST_Polygon('polygon ((0 0, 10 0, 10 10, 0 10, 0 0))', 1003)) ) SELECT id FROM my_table, temp WHERE db2gse.ST_Intersects(location, geom) = 1 2) Or another option is, if a point value is being constructed, use db2gse.ST_Point(0, 0, 1003) instead of db2gse.ST_Point('point (0 0)', 1003) 3) Some general options are also: - for non-DPF systems, remove DB2GSE.GSE_SRS_REPLICATED_AST - use parameter markers to avoid statement re-compiles - set the DB2 database configuration parameter STMT_CONC to ON - depending on the use case, consider using db2gse.EnvelopesIntersect | |
verfügbare FixPacks: | |
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in DB2 UDB Version 10.1 Fix Pack 4 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 27.12.2013 09.06.2014 09.06.2014 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.1.0.4 |