From: Slawomir Bochenski <lkslawek@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Slawomir Bochenski <lkslawek@gmail.com>
Subject: [PATCH obexd] phonebook-tracker.c: Calls query speed-up
Date: Fri, 12 Aug 2011 15:18:48 +0200 [thread overview]
Message-ID: <1313155128-26979-1-git-send-email-lkslawek@gmail.com> (raw)
Another change regarding performance of call history queries. This makes
them non-sensitive (in terms of speed) to the corner case situations when
there are hundreds of contacts all having the same phone number.
---
plugins/phonebook-tracker.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 8bc070f..875901c 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -164,7 +164,7 @@
"?_unb_contact nco:hasPhoneNumber ?_cpn . " \
CONSTRAINT \
"OPTIONAL { " \
- "{ SELECT ?_contact ?_cpn ?_role ?_number " \
+ "{ SELECT ?_contact ?_no ?_role ?_number " \
"count(?_contact) as ?cnt " \
"WHERE { " \
"?_contact a nco:PersonContact . " \
@@ -175,9 +175,9 @@ CONSTRAINT \
"?_contact nco:hasPhoneNumber ?_number" \
"} " \
"?_number maemo:localPhoneNumber ?_no . " \
- "?_cpn maemo:localPhoneNumber ?_no . " \
- "} GROUP BY ?_cpn } " \
+ "} GROUP BY ?_no } " \
"FILTER(?cnt = 1) " \
+ "?_cpn maemo:localPhoneNumber ?_no . " \
"} " \
"} "
--
1.7.4.1
next reply other threads:[~2011-08-12 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 13:18 Slawomir Bochenski [this message]
2011-08-22 7:40 ` [PATCH obexd] phonebook-tracker.c: Calls query speed-up Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313155128-26979-1-git-send-email-lkslawek@gmail.com \
--to=lkslawek@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox