From: Kevin M. Rosenberg Date: Sat, 8 May 2004 19:02:55 +0000 (+0000) Subject: r9288: 8 May 2004 Kevin Rosenberg (kevin@rosenberg.net) X-Git-Tag: v3.8.6~491 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=131603d1f5661779b00c5cfa79ecceace1078b1d r9288: 8 May 2004 Kevin Rosenberg (kevin@rosenberg.net) * tests/benchmarks.lisp: Add immediate vs. deferred join test. --- diff --git a/ChangeLog b/ChangeLog index 42d1960..7677b3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +8 May 2004 Kevin Rosenberg (kevin@rosenberg.net) + * tests/benchmarks.lisp: Add immediate vs. deferred + join test. + 8 May 2004 Kevin Rosenberg (kevin@rosenberg.net) * Version 2.10.13: Now works on openmcl 0.14.2 * sql/objects.lisp: Add :retrieval :immediate for diff --git a/tests/benchmarks.lisp b/tests/benchmarks.lisp index 3802d5c..c6b0be0 100644 --- a/tests/benchmarks.lisp +++ b/tests/benchmarks.lisp @@ -68,12 +68,17 @@ (time (dotimes (i n) (query "SELECT * FROM BENCH" :field-names nil))) - (format *report-stream* "~&~%*** OBJECT QUERY ***~%") + (format *report-stream* "~&~%*** JOINED OBJECT QUERY RETRIEVAL IMMEDIATE ***~%") (time - (dotimes (i n) + (dotimes (i (truncate n 10)) (mapcar #'(lambda (ea) (slot-value ea 'address)) (select 'employee-address :flatp t)))) - )) - - - + (format *report-stream* "~&~%*** JOINED OBJECT QUERY RETRIEVAL DEFERRED ***~%") + (let* ((slotdef (find 'address (clsql::class-slots (find-class 'employee-address)) + :key #'clsql::slot-definition-name)) + (dbi (when slotdef (clsql::view-class-slot-db-info slotdef)))) + (setf (gethash :retrieval dbi) :deferred) + (time + (dotimes (i (truncate n 10)) + (mapcar #'(lambda (ea) (slot-value ea 'address)) (select 'employee-address :flatp t)))) + (setf (gethash :retrieval dbi) :immediate))))