Patent attributes
A query rewriter associated with a database management system or visualization client rewrites a database query based on properties, characteristics, etc. of the visualization to be rendered by the visualization client. For example, the query rewriter receives an initial query and one or more visualization parameters (such as width, height and/or type of visualization) for the visualization client. The query rewriter rewrites the initial query based on the visualization parameter(s), so as to produce a data-reducing query, and then outputs the data-reducing query for execution. The query rewriter can selectively rewrite the initial query depending on size of query results of the initial query. In some example implementations, the query rewriting models a process of rasterization of geometric primitives by the visualization client, so as to facilitate error-free visualization. In many cases, the query rewriter significantly reduces the volume of query results while facilitating fast interaction with the visualization.