fixing slow queries logging
This commit is contained in:
		
							parent
							
								
									9afdd97363
								
							
						
					
					
						commit
						fd53c24346
					
				@ -369,7 +369,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository {
 | 
			
		||||
                try {
 | 
			
		||||
                    return jdbcTemplate.queryForObject(countQuery, ctx, Long.class);
 | 
			
		||||
                } finally {
 | 
			
		||||
                    queryLog.logQuery(ctx, ctx.getQuery(), System.currentTimeMillis() - startTs);
 | 
			
		||||
                    queryLog.logQuery(ctx, countQuery, System.currentTimeMillis() - startTs);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
@ -481,7 +481,7 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository {
 | 
			
		||||
            try {
 | 
			
		||||
                rows = jdbcTemplate.queryForList(dataQuery, ctx);
 | 
			
		||||
            } finally {
 | 
			
		||||
                queryLog.logQuery(ctx, countQuery, System.currentTimeMillis() - startTs);
 | 
			
		||||
                queryLog.logQuery(ctx, dataQuery, System.currentTimeMillis() - startTs);
 | 
			
		||||
            }
 | 
			
		||||
            return EntityDataAdapter.createEntityData(pageLink, selectionMapping, rows, totalElements);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user