All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH obexd] phonebook-tracker.c: Calls query speed-up
@ 2011-08-12 13:18 Slawomir Bochenski
  2011-08-22  7:40 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Slawomir Bochenski @ 2011-08-12 13:18 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Slawomir Bochenski

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH obexd] phonebook-tracker.c: Calls query speed-up
  2011-08-12 13:18 [PATCH obexd] phonebook-tracker.c: Calls query speed-up Slawomir Bochenski
@ 2011-08-22  7:40 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-08-22  7:40 UTC (permalink / raw)
  To: Slawomir Bochenski; +Cc: linux-bluetooth

Hi Slawek,

On Fri, Aug 12, 2011, Slawomir Bochenski wrote:
> 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(-)

Applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-22  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-12 13:18 [PATCH obexd] phonebook-tracker.c: Calls query speed-up Slawomir Bochenski
2011-08-22  7:40 ` Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.