1. A method for multi-query optimization, the method comprising: identifying an input query set comprising a plurality of input queries over a given data set, each query comprising a graph pattern comprising at least one subject node, predicate edge and object node triple; and clustering the plurality of input queries though incremental pair-wise merging based on structural similarities between graph patterns and query search cost optimization realized by a given merged graph pattern to generate an optimized query set comprising at least one query cluster by using linegraphs, wherein clustering the plurality of inputs further comprises: identifying a plurality of candidate merger inputs, each candidate merger input comprising an input query or an existing query cluster resulting from a previous pair-wise merging, a merger input graph pattern and a set of predicate edges contained in the merger input graph pattern; and selecting a pair of merger inputs from the plurality of candidate merger inputs having a maximum overlap in the sets of predicate edges associated with the selected pair of merger inputs; and each linegraph comprises: linegraph nodes, each linegraph node corresponding to a given predicate edge in the input queries; linegraph edges between pairs of linegraph nodes that are associated with predicate edges sharing a common subject node or object node in the input queries; and a label associated with each linegraph edge and indicating a type of join between subject nodes and object nodes.