Hi all,
I'm developing a C-based user defined function at the moment (actually
porting an existing Postgres extension) and I was wondering what kinds
of tools I should use for this and how I should actually do the development.
At the moment I'm using a simple text editor to edit the relevant files
(i.e. the c and mal files) and then completely re-compile MonetDB to
test my changes. I'm not entirely happy about this workflow though, so
is there an easier way? Perhaps with Visual Studio (I'…
[View More]m on Windows7) ?
How do the core developers work on MonetDB?
Also, if I run into any problems or have any questions, is this the
right mailing list or should I use the developers mailing list?
Best regards,
Dennis
[View Less]
Howdy. I've recently started using monetdb and was testing out the
python3-monetdb module with the 'quick start' voc dataset. I'm not
grokking the purpose of cursor.scroll() if it's working as
intended. I am getting weird (to me) results, which I'm including
below.
Running 11.17.17-20140514 of the server, client, and python module
under Ubuntu 14.04 LTS.
My example starts at this point in the quick start guide (but in python):
sql>SELECT type, COUNT(*) AS total
I loaded this snippet into …
[View More]the python3 interpreter:
from monetdb import sql
def p(c):
print('.rowcnt={}, .__offset={}, .rownumber={}'.format (
c.rowcount, c._Cursor__offset, c.rownumber))
print ('.__rows={}'.format (c._Cursor__rows))
db = sql.connect(database='voc', user='voc', password='voc')
cursor = db.cursor()
# Set the arraysize small so it traverses result sets,
# though it doesn't matter for the problem I'm seeing.
cursor.arraysize = 2
cursor.execute("SELECT type, COUNT(*) AS total FROM onboard_people GROUP BY
type ORDER BY type;")
Then proceeded with this interactive session. Consecutive
fetchone()'s seem to work properly; it traverses to the second
result set. Where I get confused is when I .scroll():
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=0
.__rows=[('craftsmen', 2349), ('impotenten', 938)]
>>> cursor.fetchone()
('craftsmen', 2349)
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=1
.__rows=[('craftsmen', 2349), ('impotenten', 938)]
>>> cursor.fetchone()
('impotenten', 938)
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=2
.__rows=[('craftsmen', 2349), ('impotenten', 938)]
>>> cursor.fetchone()
('passengers', 2813)
>>> p(cursor)
.rowcnt=6, .__offset=2, .rownumber=3
.__rows=[('passengers', 2813), ('seafarers', 4468)]
# Here's where I scroll back to the beginning. The
# offset changes, but the rownumber doesn't.
>>> cursor.scroll (0, mode='absolute')
>>> p(cursor)
.rowcnt=6, .__offset=0, .rownumber=3
.__rows=[('craftsmen', 2349), ('impotenten', 938), ('passengers', 2813),
('seafarers', 4468), ('soldiers', 4177)]
# My expectation was that this would be ('craftsmen', 2349),
# but it continues as if I didn't scroll.
>>> cursor.fetchone()
('seafarers', 4468)
# I try to back to the last item with no luck, it instead
# marches forward to the next item as if I didn't scroll.
>>> cursor.scroll (-1, mode='relative')
>>> p(cursor)
.rowcnt=6, .__offset=3, .rownumber=4
.__rows=[('seafarers', 4468), ('soldiers', 4177), ('total', 2467)]
>>> cursor.fetchone()
('soldiers', 4177)
Am I using the .scroll() wrong? Is this a bug?
Thanks,
Chris
[View Less]
Hi all,
I'm executing a very large query with MonetDB and it takes very long
before the result is calculated (e.g. several minutes) whereas
PostgreSQL does it in less than 100 ms.
The query itself is a very simple select + sum query but the WHERE
condition has more than a thousand equality tests on the primary key
(ckey) of the table. It basically looks like this:
SELECT sum(countAggr)
FROM sys.london_hav_neogeo_pa
WHERE ckey=16947611436 OR ckey=16947611437 OR ckey=16947611438 OR
ckey=…
[View More]16947611439 OR ckey=16947611440
OR ckey=16947617908 OR ckey=16947617909 OR ckey=16947617910 OR
ckey=16947617911 OR ckey=16947617912
[.. several hundreds of lines removed ..]
OR ckey=289411309830 OR ckey=289411309831 OR ckey=289411309832 OR
ckey=289411309833
OR ckey=289411309834 OR ckey=289411309835 OR ckey=289411309836 OR
ckey=289411309837;
Does anyone know why it's taking so long with MonetDB and if there is a
way to significantly improve performance?
Best regards,
Dennis
[View Less]
Hi,
My database started consuming disk space. Here is how:
1. run procedure.
2. procedure fails with server crash due to insufficient disk space. It
eats up all the space and crash.
3. restart the database but the disk space remain allocated. All changes
by the procedure are rolled back. There are inserts but not that many to
eat up 10 GB of space. When I check sys.storage, it does not show any
large table.
My guess is that it allocates temporary space and it does not deallocate
it after …
[View More]database start. It deallocates a bit but not everything.
Is there any way how to shrink it manually? It already ate around 40 GB
space. The whole database is around 130 GB so the quick dump and restore
is not possible.
Thank you for any tips,
Radovan Biciste
[View Less]
Hi,
I'm trying to set the maximum number of cores using gdk_nr_threads
parameter but it doesn't seem to work for me.
I've tried "variants" of this command:
monetdbd set gdk_nr_threads=4 start /my/dbfarm
but it seems like gdk_nr_threads is not a supported property.
Additionally to this, I would like to ask how does MonetDB handle
concurrent user sessions and the available cpu resources ?
The manual says there is support for "inter- and intra- parallelism".
Can someone roughly explain me what …
[View More]to expect or give me a pointer to the
code that is responsible for resource management ?
Cheers!
Dimitris
[View Less]