>From a C/C++ code, how do I access the MAL level storage operators? I would assume that using the right libraries I should be able to get this data into my C/C++ code. Could you please point me to the right resources here? Thanks.
Further, I want to know the storage cost on disk for the entire database. As I see the data is stored as a "farm". Does this mean that I can sum the sizes of all files under the root folder to get the disk storage cost?
~Yuva
Yuvaraj Athur Raghuvir wrote:Indices are automatically created and dropped as a side effect of queries.
> Thanks.
>
> Regarding db size, I would expect that the storage strategy will have
> additional overheads due to bookkeeping requirements necessary for
> reconstruction of the relations between the data elements. Since there
> are no indices (I assume this due to columnar storage) I can discount
> on the space required for indices.
>
They disappear at the end of a session.the SQL level does not open up the kernel information about storage
> Are there Mapi calls that I can use to determine the size of the
> tables? I would like to horizontally partition the data across
> multiple stores based on table size and growth estimates.
>
requirements.
At the MAL level several operators are available to assess storage cost.> ~Yuva
>
>
> On 08/02/2008, Yuvaraj Athur Raghuvir <yuvaraj.a.r@gmail.com> wrote:
>
>> Finally, I have managed to get the Mbeddded example working in VC++ 2005
>> Express Edition on Windows XP ! Thanks to the folks in the mailing list.
>>
>> Use Case: MonetDB5 , Embedded Mode , SQL
>>
>> To move towards the application I intend to experiment on, I need some more
>> information:
>> 1) How to make data durable? In the simple example, I tried the following:
>> a) First Run: Create table and insert rows. Select to check if everything
>> is ok.
>> b) Second Run: Only perform selection
>>
>>>> I get an error in the second run.
>>>>
>> 2) How to get meta data of the database?
>> a) I want to know the size of the tables and meta tables in the data base.
>> In particular I am interested in seeing the growth of the database on
>> addition of content.
>> b) Typically, there is a master table in the database that records
>> information of the schema persisted. What is the name of the Master Table
>> and its schema in MonetDB?
>> c) SQLite has an independent analyzer tool which dumps the state of the
>> storage from which I can extract most of the data I need. Does MonetDB have
>> a similar mechanism?
>>
>> ~Yuva
>>
>>
>>>>>> code snippet >>>>>
>>>>>>
>> dbh = embedded_sql (set, setlen);
>> if (dbh == NULL || mapi_error(dbh))
>> die(dbh, hdl);
>> /* switch off autocommit */
>> if (mapi_setAutocommit(dbh, 0) != MOK || mapi_error(dbh))
>> die(dbh,NULL);
>> if ((hdl = mapi_query(dbh, "create table emp"
>> " (name varchar(20),age int)")) == NULL || mapi_error(dbh))
>> die(dbh, hdl);
>> close_handle(dbh,hdl);
>> for(i=0; i< 1000; i++) {
>> char query[100];
>> _snprintf(query, 100,"insert into emp values(\'user%d\', %d)", i, (i
>> % 82));
>> if ((hdl = mapi_query(dbh, query)) == NULL || mapi_error(dbh))
>> die(dbh, hdl);
>> close_handle(dbh,hdl);
>> }
>> if ((hdl = mapi_query(dbh, "select * from emp")) == NULL ||
>> mapi_error(dbh))
>> die(dbh, hdl);
>> i=0;
>> while (mapi_fetch_row(hdl)) {
>> char *age = mapi_fetch_field(hdl, 1);
>> i= i+ atoi(age);
>> }
>> if (mapi_error(dbh))
>> die(dbh, hdl);
>> close_handle(dbh,hdl);
>> printf("The sum is %d \n",i);
>> mapi_disconnect(dbh);
>> return 0;
>>
>>
>> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> MonetDB-users mailing list
> MonetDB-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MonetDB-users mailing list
MonetDB-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-users