Fix up hash interface and speed up save queries 10x
Fix all optimizer
This commit is contained in:
parent
ab3f59d21f
commit
aedd0401e2
5 changed files with 26 additions and 12 deletions
|
|
@ -160,11 +160,14 @@ func (n *SQLNodeIterator) buildWhere() (string, []string) {
|
|||
return query, vals
|
||||
}
|
||||
|
||||
func (n *SQLNodeIterator) buildSQL(next bool, val graph.Value, _ bool) (string, []string) {
|
||||
func (n *SQLNodeIterator) buildSQL(next bool, val graph.Value, topLevel bool) (string, []string) {
|
||||
topData := n.tableID()
|
||||
tags := []tagDir{topData}
|
||||
tags = append(tags, n.getTags()...)
|
||||
query := "SELECT DISTINCT "
|
||||
query := "SELECT "
|
||||
if topLevel {
|
||||
query += "DISTINCT "
|
||||
}
|
||||
var t []string
|
||||
for _, v := range tags {
|
||||
t = append(t, v.String())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue