database

MySql cache problems... some questions

First of all, I am using PhpMyAdmin, is this okay or not? Because when I have cache disabled, and do two queries after eachother, the second query always is faster, so I am thinking maybe there is an internal cache on PhpMyAdmin? Secondly, is there any way to get the time of how long a query takes, into php, and echo it onto the browser...

query_cache_min_res_unit; What is it and what does it do?

I am setting up cache in MySQL. Could someone please explain query_cache_min_res_unit? What does it do etc? I have read the manual and it doesn't explain so good. Details are appreciated... Or examples... Thanks ...

What happens if I leave a database connection open in an ASP.NET web page

Suppose that I have an ASP.NET page. In the page load event handler, I open a database connection and do some processing. But after the processing is done, I don't close the connection explicitly by calling the CLOSE method of the connection object. Now when the page processing at the server side is finished, the GC will dispose all the...

How to use OR Condition in Paginate function in Cakephp ??

Hi! I am facing a problem while fetching values using paginate function in cakephp. In the "to" field of message I have CSV fields of userid. To search messages for a single user. I am using the code below... $this->set('message', $this->paginate('Message', array( 'or'=> array( "Message.to LIKE" => "".$this->Session->read('...

How can I improve my MySQL server variables for my configuration?

I am new to database management. My application is very database intensive so I've tried really hard to make sure the application and the MySQL database are working as efficiently as possible together. Currently I'm tuning the MySQL query cache on a 6 gb RAM, quadcore processor computer. My current MySQL is configured as follows: qu...

sybase error while fetching coloums more then 255 characters

hello all, i m having problems while fetching data from columns which have more than 255 characters i got such an error message: Open Client Message: Message number: LAYER = (1) ORIGIN = (4) SEVERITY = (1) NUMBER = (132) Message String: ct_fetch(): user api layer: internal common library error: The bind of result set item 3 resulted...

Can anyone recommend a good book over the Caché database ?

I am currently running the local version of Caché on my system in order to determine if I can (and will) take on a new possible project. Can anyone recommend a good book on the Caché (preferably having read it - I don't need a copy of the back cover) ? Querying Amazon drops the é and replaces it with an e, creating 'cache' which display...

What's the best database structure to keep multilingual data?

Here's an example: [ products ] id (INT) name-en_us (VARCHAR) name-es_es (VARCHAR) name-pt_br (VARCHAR) description-en_us (VARCHAR) description-es_es (VARCHAR) description-pt_br (VARCHAR) price (DECIMAL) The problem: every new language will need modify the table structure. Here's another example: [ products-en_us ] id (INT) name (VA...

Is learning the Caché database hard coming from relational databases and object oriented programming language like Delphi ?

I am currently running the local version of Caché on my system in order to determine if I can (and will) take on a new possible project. The current project uses Delphi 7 as a front end calling a Caché dll where the business logic is stored in the database. I have a background of Sqlserver and Firebird (and before Access and Paradox) a...

Checking if INSERT INTO statement was successful

I am using a MS Access database as the backend of my VB.NET application. I am entering users details into the database using an INSERT INTO statement: cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & config("DatabasePath") & ";") cn.Open() cmd = New OleDbCommand("INSERT INTO blah blah blah...", cn) dr = cmd.Ex...

Possible to 'Show MySQL Variables' with PHP code onto the browser?

Is this possible: mysql_query("SHOW VARIABLES LIKE 'query%'"); in php? If so how can I display the variables onto the browser? If it is not possible, which mysql command tool is easiest and free to download? Thanks ...

Get MySql result-set size from query using PHP

Is it possible to get the size of the result-set when doing a query? I need to set a proper MySql cache_limit (MB) and therefore I am trying out some queries, but I need to know the sizes of the result-sets to fine-tune my cache configurations. What exactly does query_cache_limit do when measuring the size of a query (or result)... An...

Testing approach - DB, Junit

Hi All, i would like to ask you about writting tests which are connected with data from database. In my opinion the best way is to have a diffrent DB schema with correct data only for unit testing. In test code i can load the object on the base of ID. The second possiblity is to putting data into database during the unit test. I dont l...

Which approach would you use for this specific DB Design Issue ?

Just looking for opinions on the following 2 scenarios. We have a table where we store our outbound sms-messages. Everytime one of our services sends a premium rate message, it stores them in this table... to date, all the important information that needs to be stored has been in the same format. SMSMessages ---------------------- ID ...

Selecting distinct months and years and then breakdown of values for

I'm using Open Flash Chart to create statistics and one of the things i need to be able to do is generate a Stacked Bar Chart. Logically i need to be able to Group all the distinct Month/Year combinations, Dec 2009, Jan 2010, Feb 2010 etc. and then from that group all the various rows, i.e. the different types of enquiry a visitor made ...

Is ORM fit for complex projects?

I've not started the ORM trip yet, because I'm not sure how it works when the project becomes very complex. What's your opinion or experience? ...

Alternative to database for storing data?

I was using SQL Server Compact Edition (local-database) for my application. But while I was using the entity framework, I kept experiencing a very annoying UpdateException. My database only has two small tables with a foreign key relationship linking them together. So I am asking if there is any alternative to a database? Or is that the ...

The best way to manage database changes

What is the best way to manage database changes? I need to have a solutions regardless the database client's language. Also I'd like to be able to use specific database features in those changes such as stored procedures, triggers and so on. ...

Why a larger table is faster than new smaller one?

We have a large table in SQL Server with almost 40.000.000 records. it took considerable time to running queries on it. so we decided to leave all old and out of date records there and move usable records in a new table an use the new one. while it supposed to be faster than old table which have almost double count of records, the proble...

How to update table schema after an app upgrade on Android?

I have an unfinished application, but I want to address now the future update of it. Suppose my app was upgraded, so when starts, detects that the database schema is outdated. So for each table has to update according to version number to the new schema while preserving all data. I've read somewhere that on Android the SQLite database ...