Skip to content

Commit a4ee20e

Browse files
author
James William Pye
committed
Add a couple numeric columns to better portray overall performance.
1 parent 5e7a288 commit a4ee20e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

postgresql/test/perf_query_io.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
import os
99
import time
1010
import sys
11+
import decimal
1112

1213
def insertSamples(count, insert_records):
1314
recs = [
14-
(-3, 123, 0xfffffea023, 'some_óäæ_thing', 'varying', 'æ')
15+
(-3, 123, 0xfffffea023, decimal.Decimal("90900023123.40031"), decimal.Decimal("432.40031"), 'some_óäæ_thing', 'varying', 'æ')
1516
for x in range(count)
1617
]
1718
gen = time.time()
@@ -53,9 +54,9 @@ def timeTupleRead(portal):
5354

5455
def main(count):
5556
execute('CREATE TEMP TABLE samples '
56-
'(i2 int2, i4 int4, i8 int8, t text, v varchar, c char)')
57+
'(i2 int2, i4 int4, i8 int8, n numeric, n2 numeric, t text, v varchar, c char)')
5758
insert_records = prepare(
58-
"INSERT INTO samples VALUES ($1, $2, $3, $4, $5, $6)"
59+
"INSERT INTO samples VALUES ($1, $2, $3, $4, $5, $6, $7, $8)"
5960
)
6061
select_records = prepare("SELECT * FROM samples")
6162
try:

0 commit comments

Comments
 (0)