File size: 5,967 Bytes
7a96e93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
{
  "schema": "library",
  "dataset_version": "0.2.0",
  "family": "lib_reader_left_join_null",
  "model": "deepseek-coder-v2:latest",
  "model_slug": "deepseek-coder-v2",
  "model_digest": "63fb193b3a9b4322a18e8c6b250ca2e70a5ff531e962dbf95ba089b2566f2fa5",
  "quantization": "Q4_0",
  "parameter_size": "15.7B",
  "protocol": {
    "engine": "ollama",
    "engine_version": "0.40.5",
    "temperature": 0,
    "seed": null,
    "seed_note": "not set: the run protocol specified no seed, so the engine default was used",
    "num_ctx": 4096,
    "num_predict": 1200,
    "responses_per_family": 1
  },
  "prompt": "Rewrite the following MySQL 8.4 SELECT query for efficiency. Preserve output column names, values, duplicates, NULL behavior and the specified row order for EVERY state allowed by the schema. Do not add indexes or change the schema. Return only one SELECT statement, without markdown or explanation. If no safe improvement is available, return the original query.\nCREATE TABLE lib_readers(id INTEGER PRIMARY KEY, name VARCHAR(40) NOT NULL UNIQUE)\nCREATE TABLE lib_books(id INTEGER PRIMARY KEY, title VARCHAR(40) NOT NULL UNIQUE, price INTEGER NOT NULL)\nCREATE TABLE lib_loans(id INTEGER PRIMARY KEY, reader_id INTEGER NOT NULL, book_id INTEGER NOT NULL, day_no INTEGER NOT NULL, fee INTEGER NOT NULL, returned INTEGER, FOREIGN KEY(reader_id) REFERENCES lib_readers(id), FOREIGN KEY(book_id) REFERENCES lib_books(id))\nQUERY:\nSELECT r.id FROM lib_readers r LEFT JOIN lib_loans l ON l.reader_id=r.id WHERE l.id IS NULL ORDER BY r.id",
  "prompt_sha256": "0d9c7bd8714301b7756a5ea025ebd0e54d96b0326bc1a4cd85d5e9d54bb32a6c",
  "candidate_sql": "SELECT r.id \nFROM lib_readers r \nLEFT JOIN lib_loans l ON l.reader_id = r.id \nWHERE l.id IS NULL \nORDER BY r.id;",
  "provenance": {
    "collection": "sreb-full-2026-10-19",
    "collected_utc": "2026-10-18T23:52:47+00:00"
  },
  "raw_response": {
    "model": "deepseek-coder-v2:latest",
    "created_at": "2026-10-18T23:53:00.6130346Z",
    "response": " ```sql\nSELECT r.id \nFROM lib_readers r \nLEFT JOIN lib_loans l ON l.reader_id = r.id \nWHERE l.id IS NULL \nORDER BY r.id;\n```",
    "done": true,
    "done_reason": "stop",
    "context": [
      100000,
      5726,
      25,
      87321,
      254,
      1893,
      13142,
      207,
      23,
      13,
      19,
      11766,
      5162,
      327,
      10209,
      13,
      95171,
      2827,
      3823,
      4773,
      11,
      3039,
      11,
      52124,
      11,
      4587,
      6872,
      285,
      254,
      7116,
      5451,
      1835,
      327,
      50692,
      1977,
      5987,
      457,
      254,
      16086,
      13,
      3132,
      441,
      962,
      20986,
      410,
      2262,
      254,
      16086,
      13,
      7898,
      889,
      634,
      11766,
      6161,
      11,
      1673,
      91782,
      410,
      11515,
      13,
      1273,
      642,
      5730,
      11659,
      317,
      2324,
      11,
      972,
      254,
      3632,
      5162,
      13,
      185,
      13374,
      11841,
      2479,
      62,
      77360,
      7,
      305,
      50601,
      24483,
      14319,
      11,
      1210,
      22942,
      7,
      19,
      15,
      8,
      5790,
      4587,
      51166,
      8,
      185,
      13374,
      11841,
      2479,
      62,
      15691,
      7,
      305,
      50601,
      24483,
      14319,
      11,
      3758,
      22942,
      7,
      19,
      15,
      8,
      5790,
      4587,
      51166,
      11,
      4113,
      50601,
      5790,
      4587,
      8,
      185,
      13374,
      11841,
      2479,
      62,
      789,
      533,
      7,
      305,
      50601,
      24483,
      14319,
      11,
      8959,
      62,
      305,
      50601,
      5790,
      4587,
      11,
      2135,
      62,
      305,
      50601,
      5790,
      4587,
      11,
      1492,
      62,
      2470,
      50601,
      5790,
      4587,
      11,
      10229,
      50601,
      5790,
      4587,
      11,
      5651,
      50601,
      11,
      41246,
      14319,
      7,
      24163,
      62,
      305,
      8,
      42075,
      2479,
      62,
      77360,
      7,
      305,
      654,
      41246,
      14319,
      7,
      3234,
      62,
      305,
      8,
      42075,
      2479,
      62,
      15691,
      7,
      305,
      1509,
      185,
      52974,
      25,
      185,
      7504,
      428,
      13,
      305,
      7431,
      2479,
      62,
      77360,
      428,
      34455,
      13688,
      2479,
      62,
      789,
      533,
      284,
      6510,
      284,
      13,
      24163,
      62,
      305,
      28,
      81,
      13,
      305,
      11267,
      284,
      13,
      305,
      5077,
      4587,
      25448,
      9781,
      428,
      13,
      305,
      185,
      185,
      77398,
      25,
      34083,
      6205,
      185,
      7504,
      428,
      13,
      305,
      207,
      185,
      14047,
      2479,
      62,
      77360,
      428,
      207,
      185,
      33001,
      13688,
      2479,
      62,
      789,
      533,
      284,
      6510,
      284,
      13,
      24163,
      62,
      305,
      403,
      428,
      13,
      305,
      207,
      185,
      19927,
      284,
      13,
      305,
      5077,
      4587,
      207,
      185,
      19579,
      9781,
      428,
      13,
      305,
      26,
      185,
      10897
    ],
    "total_duration": 13453238400,
    "load_duration": 274439000,
    "prompt_eval_count": 237,
    "prompt_eval_cached_count": 197,
    "prompt_eval_duration": 3571582000,
    "eval_count": 52,
    "eval_duration": 9457427000
  },
  "response_text": " ```sql\nSELECT r.id \nFROM lib_readers r \nLEFT JOIN lib_loans l ON l.reader_id = r.id \nWHERE l.id IS NULL \nORDER BY r.id;\n```",
  "done_reason": "stop",
  "elapsed_seconds": 14.277,
  "markdown_removed": true
}