File tree Expand file tree Collapse file tree 9 files changed +19
-9
lines changed
Expand file tree Collapse file tree 9 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1+ ## Naksha_1.1.4
2+
3+ - Optimized Txn fetch query to avoid long-running query issue against space with very old last published transaction Id
4+
15## Naksha_1.1.3
26
37- Increased DB Pool size of Naksha Admin DB from 10 to 25 to allow additional sequencer/publisher jobs to run in parallel.
Original file line number Diff line number Diff line change 4141
4242 <groupId >com.here.xyz</groupId >
4343 <artifactId >xyz-hub</artifactId >
44- <version >1.1.3 </version >
44+ <version >1.1.4 </version >
4545 <packaging >pom</packaging >
4646
4747 <modules >
Original file line number Diff line number Diff line change 2525 <groupId >com.here.xyz</groupId >
2626 <artifactId >xyz-hub</artifactId >
2727 <relativePath >../</relativePath >
28- <version >1.1.3 </version >
28+ <version >1.1.4 </version >
2929 </parent >
3030
3131 <licenses >
Original file line number Diff line number Diff line change 2525 <groupId >com.here.xyz</groupId >
2626 <artifactId >xyz-hub</artifactId >
2727 <relativePath >../pom.xml</relativePath >
28- <version >1.1.3 </version >
28+ <version >1.1.4 </version >
2929 </parent >
3030
3131 <licenses >
Original file line number Diff line number Diff line change 2525 <groupId >com.here.xyz</groupId >
2626 <artifactId >xyz-hub</artifactId >
2727 <relativePath >../</relativePath >
28- <version >1.1.3 </version >
28+ <version >1.1.4 </version >
2929 </parent >
3030
3131 <licenses >
Original file line number Diff line number Diff line change 2525 <groupId >com.here.xyz</groupId >
2626 <artifactId >xyz-hub</artifactId >
2727 <relativePath >../</relativePath >
28- <version >1.1.3 </version >
28+ <version >1.1.4 </version >
2929 </parent >
3030
3131 <licenses >
Original file line number Diff line number Diff line change 2525 <groupId >com.here.xyz</groupId >
2626 <artifactId >xyz-hub</artifactId >
2727 <relativePath >../</relativePath >
28- <version >1.1.3 </version >
28+ <version >1.1.4 </version >
2929 </parent >
3030
3131 <licenses >
Original file line number Diff line number Diff line change @@ -1494,6 +1494,7 @@ CREATE OR REPLACE FUNCTION xyz_config.naksha_fetch_newer_transactions( in_hst_sc
14941494AS
14951495$BODY$
14961496DECLARE
1497+ table_name TEXT ;
14971498 txn_stmt TEXT ;
14981499 txn_record RECORD;
14991500 crt_txn_rec_id int8;
@@ -1502,12 +1503,17 @@ DECLARE
15021503 fetched_count int ;
15031504BEGIN
15041505 -- Statement to fetch newer transaction Id(s) from Transactions table for a given space
1506+ -- We use "schema" and "table" based query (instead of space) to hit the right index
1507+ -- txn_stmt:= format('SELECT t.id, t.txn FROM xyz_config.transactions t '
1508+ -- ||'WHERE t.space = $1 AND t.id >= $2 ORDER BY t.id ASC LIMIT %s', in_limit_rows+1);
15051509 txn_stmt:= format(' SELECT t.id, t.txn FROM xyz_config.transactions t '
1506- || ' WHERE t.space = $1 AND t.id >= $2 ORDER BY t.id ASC LIMIT %s' , in_limit_rows+ 1 );
1510+ || ' WHERE t."schema" = $1 AND t."table" = $2 AND t. id >= $3 ORDER BY t.id ASC LIMIT %s' , in_limit_rows+ 1 );
15071511
1512+ table_name := replace(in_hst_table, ' _hst' , ' ' );
15081513 fetched_count := 0 ;
15091514 -- Fetch transaction Id(s)
1510- FOR txn_record IN EXECUTE txn_stmt USING in_space, in_last_txn_id LOOP
1515+ -- FOR txn_record IN EXECUTE txn_stmt USING in_space, in_last_txn_id LOOP
1516+ FOR txn_record IN EXECUTE txn_stmt USING in_hst_schema, table_name, in_last_txn_id LOOP
15111517 EXIT WHEN fetched_count >= in_limit_rows;
15121518 -- RAISE NOTICE 'Transaction fetched is %', txn_record;
15131519
Original file line number Diff line number Diff line change 2525 <groupId >com.here.xyz</groupId >
2626 <artifactId >xyz-hub</artifactId >
2727 <relativePath >../</relativePath >
28- <version >1.1.3 </version >
28+ <version >1.1.4 </version >
2929 </parent >
3030
3131 <licenses >
You can’t perform that action at this time.
0 commit comments