Skip to main content

Idea pipeline (top 25)

Filter by idea status

Filter by product

2011 Ideas

Retain active cell highlight and scroll position in Cube after refreshNew

Current situation We have a screen with a Cube (master) and multiple detail tabs. The cube itself is read-only, while the underlying data is modified via the detail tabs (using Edit in grid or Drag & Drop between details).Whenever a change is made in one of the detail tabs, the parent cube automatically refreshes to reflect the updated aggregates. During this refresh: The cube's scrollbar jumps back to the top. The visual highlight of the previously selected cell is lost. Interestingly, the detail tabs retain their filtered data, which indicates that the cube still knows which cell/context holds the focus in the background—it is simply not reflected visually in the UI anymore.Proposed solution When a Cube refreshes due to changes in a detail subject (or a general refresh where the selected coordinates still exist): Automatically scroll the cube back to the position of the active/focused cell so the row/column is back in view. Visually re-apply the cell selection highlight to the active cell. Business value / Impact When users are actively planning or adjusting records in detail tabs based on cube totals, losing the visual anchor in the cube forces them to manually scroll and search for the cell they were just working on after every single edit. Retaining the visual focus and scroll position will significantly improve usability and speed up data-entry workflows.  

luukschoutenThinkwiser

Smart unit test execution: only run tests for affected objectsNew

IdeaThe Software Factory already supports smart upgrades, which upgrade only what has changed. I'd like the same principle for unit tests: when running an upgrade or a creation, only execute the unit tests of objects that were affected by the changes, and run the full set separately.WhyWe now generate a large share of our unit tests with AI, which makes our test suites many times bigger than when we wrote them by hand. On one application with about 125 tables we have around 1,500 unit tests, and a full run takes 30 to 40 minutes. While it runs, the branch is occupied: we can't generate the definition, so development on that branch stops for the duration.Most of that time is spent for nothing. In a typical change only a small part of the model is touched, yet every test is executed, including the tests for the large majority of objects that did not change at all.ProposalSmart run during upgrade/creation. Only run the unit tests whose object is affected by the changes since the last successful run. Ideally this includes dependencies: a test on a task that calls a changed subroutine should also run. Full run on schedule. The ability to schedule a run of all unit tests, for example nightly, so the full regression still happens without blocking development during the day. Full run on demand. Keep the option to start a full run manually, for example before a delivery or release.ResultShort feedback loops during development, no idle time on the branch, and the full safety net still in place where it matters: nightly and before delivery.

Make tsf_optimize (SQL Server) skip unnecessary workNew

AI came up with the following proposal: Summarytsf_optimize touches every index and every modified table on every run, regardless of whether there is anything to gain. On larger databases this makes it slow while doing almost nothing useful. We propose adding thresholds (with parameters and safe defaults) so that it only maintains indexes and statistics that actually need it.Observed situation (customer database, SQL Server, ~100 GB)Run time of tsf_optimize: 2 h 22 min. After the run: ~850 indexes (~54 GB) have 0.2–0.9 % average fragmentation, but all of them are REORGANIZEd every run because the only rule is frag <= 30 → REORGANIZE. The actual REBUILDs (83 indexes > 30 %) are all tiny (< 1,000 pages, 14 MB in total) and take seconds. Afterwards UPDATE STATISTICS <table> runs for every table with modification_counter > 0, including large temporal history tables (5–7 GB each), and also for tables whose indexes were just rebuilt (and so already have fresh full-scan statistics).Why the current logic is costlyNo lower bound on fragmentation. An index with 0 % fragmentation still gets a REORGANIZE. That read is pure overhead. No lower bound on size. Small indexes (< ~1,000 pages) gain nothing from defragmentation. Microsoft and the common maintenance scripts skip them. REORGANIZE is the expensive path for large indexes. It is single-threaded and fully logged, and LOB_COMPACTION = ON also reads all LOB pages. Running it on every large index costs time, log volume and I/O, and in AG/log-shipping setups also extra log traffic. Statistics are updated per table, for any change, and twice after a rebuild. A single modified row triggers a statistics update for the whole table. Statistics already refreshed by an index rebuild are updated again, and with sampling, so the full-scan statistics from the rebuild are replaced by sampled ones.Proposed changes# Change Default 1 Skip indexes below a minimum fragmentation @frag_low = 5 (%) 2 Skip indexes below a minimum size @min_pages = 1000 3 Keep the REORGANIZE/REBUILD boundary, but make it configurable @frag_high = 30 (%) 4 REBUILD ONLINE = ON when the edition supports it (Enterprise, Developer, Azure SQL); otherwise keep the current behaviour automatic 5 Update statistics per statistic (UPDATE STATISTICS t s), not per table, and only when the change is significant relative to the row count e.g. modification_counter > 0.1 % of rows or the SQL Server dynamic threshold (sqrt(1000 * rows)) 6 Skip statistics of indexes that were just rebuilt automatic 7 Optional: @max_duration_minutes to stop starting new operations after a time limit null (no limit) Expose the thresholds as optional parameters with these defaults. Existing calls without parameters keep working, and customers can tune them without overriding the template.Expected effectOn our database the run would drop from about 2 h 20 min to minutes. Hardly any index is above 5 % fragmentation after the first run, and statistics are only refreshed where needed. The index and statistics quality stays the same, because the skipped work does not change anything measurable.Does this hold in all cases?Skipping low fragmentation and small indexes (1, 2): yes, safe everywhere. The worst case is that an index with slightly more than 0 % fragmentation stays as it is, which is the standard in Microsoft guidance and in Ola Hallengren's scripts. On SSD storage, fragmentation matters even less. REBUILD vs REORGANIZE (3, 4): depends on the edition. On Standard Edition, REBUILD is offline and locks the table, so REORGANIZE (online) remains the right choice for applications in use 24/7. That is why the boundary should stay configurable and ONLINE should only be used when available. Statistics (5, 6): yes, safe everywhere. AUTO_UPDATE_STATISTICS keeps covering the rest. Customers with very skewed data may want a lower threshold or FULLSCAN, so this should be configurable. Very small databases: no noticeable gain, but no harm either. Other RDBMS (DB2, Oracle, PostgreSQL): this proposal only concerns the SQL Server template.