mysql

MySQL: splitting one table to multiple tables (same columns) for performace increase?

This question is about performance, not about possible solutions. My system holds many items of different categories. Each category has its own table since each table has many rows AND the fields are different. ItemA - id, fld1, fld2 ItemB - id, fld1, fld3, fld4 ItemC - id, fld1, fld3, fld5 .... Now there's a need to manage user inve...

Getting Doctrine to use MySQL "FORCE INDEX"

I have a query in Doctrine's DQL that needs to be able to use MySQL's "FORCE INDEX" functionality in order to massively reduce the query time. Below is what the query basically looks like in plain SQL: SELECT id FROM items FORCE INDEX (best_selling_idx) WHERE price = ... (etc) LIMIT 200; I assume I have to extend some Doctrine compon...

Cross language development problem

I'm working on a project that involves a database (My SQL), website (PHP) and a custom high performance server application (C++). The C++ application (and its accompanying client application) make up the main bulk of the project, with the database storing long term data for it. The website is primarily for displaying various statistics, ...

Using a single wiki table for multiple subject tables

Hello, I wonder to know if someone can help to understand if I'm doing well using a single table with wiki content for multiple subjects, so: TABLE wiki ==> wiki_id wiki_content wiki_language wiki_user_id TABLE houses house_id house_name house_year house_location ==> wiki_id TABLE architec...

auto_increment value change affect performance in MySQL?

Hello I have changed auto_increment value to 1000000 of a MyISAM table. Does this affect read/write performance? I thought that db engine may look for IDs before ID 1000000 everytime a list of rows is requested. ...

Custom Query Pagination Cakephp

I have a custom query in my controller and I would like to implement the custom query pagination I found on cakephp.org but their example is not similar to mine. Can someone please help me paginate this result in my view: $cars = $this->Car->query(" select Car.id, Car.make, Car.model, Car.year, Car.description, CarImage.thumbnail ...

Sql Query Solution

I have a query as follows. select strftime('%Y-%m',A.traDate) as Month,sum(A.TraAmt) as Total,C.GroupType from TransactionTbl A left join TransactionCategory B on A.CategoryID = B.CategoryID left join CategoryGroup C on B.CatGRoupID=C.CatGRoupID where A.UserID=1 and A.ProfileID=1 and date(A.TraDate) between date('2009-12-01') and dat...

generate DBF files

How to generate DBF files with delphi? More information: I need a portable Database to run in a pendrive I don't know if DBF is the better soluttion. I like MySql but is hard to find a portable version I am working with XML at this time but I don't know how to make a Query. ...

Migrate Grail's HSQLDB embedded database

how to migrate Grail's HSQLDB embedded database(That contains my App's Data that I don't want to lose) into external one, such as MySQL or ApacheDerby? ...

MYSQL: how to "reorder" a table

I have a table like the following, | id | name | color | ------+--------+--------- | 1 | pear | green | | 2 | apple | red | | 3 | banana | yellow | | 4 | grape | purple | I'd like to reorder alphabetically using the "name" column and reset the id (autoincrement) with this new order to end up with the following | i...

what is faster flex and Java or flex and php?

Hello stackoverflowers, we are designing a major webapplication for the www. It a social community site. and i would like to know witch direction i need to take. What works faster, flex and php or java and flex? i've read that flex and php with amfphp is very fast (with AMFEXT). but i have seen that 90% of the major companies here i...

Is it possible to detect the field type of a MySQL field in CakePHP?

Hi, I'm planning on converting all the datetime data from a MySQL database to the format date('d-M-Y'). I'm thinking of doing it in the afterFind() callback but I'm wondering, how do detect the field type in CakePHP so I can create conditional statements? Thanks in advance! ...

apply code to all looped items but last one

Im looping through some mysql results and need to add <span id=bottom></span> to each of them except the last row, whats the easiest way of doing this? Will i have to count rows and then use a counter and an if/else statement? Or is there an easier method? ...

MySql portable version

anyone know a portable version of mysql? I know xampp but it comes with PHP and Apache together anyone know how to isolate the mysql? ...

Few questions from a Java programmer regarding porting preexisting database which is stored in .txt file to mySQL ?

I've been writing a Library management Java app lately, and, up until now, the main Library database is stored in a .txt file which was later converted to ArrayList in Java for creating and editing the database and saving the alterations back to the .txt file again. A very primitive method indeed. Hence, having heard on SQL later on, I'm...

What Grid Setup would you recommend

I have a web that currently runs off one Mediatemple VPS. I'm now at the stage were the site is getting bogged down with scaling issues and I need to move to a better setup. Is this a sensible setup: php on one server mysql database on another Cloud Files CDN used to server images, javascript and css My main thinking is to put the ...

MySQL - Unable to create column

I am using MySQL 5.1. When i am trying to add new field, it throws error like this, Database name is "ebill". Error Code : 1025 Error on rename of '.\ebill\#sql-98_477' to '.\ebill\user' (errno: 150) (0 ms taken) This is my sql query: alter table `ebill`.`user` add column `User_Password` varchar(25) NULL Where is the issue? ...

Local connection with Database

How do I connect my local client application with the database on the server? I am using Delphi and MySQL. ...

PHP & MySQL - How to count the number of times data was entered for a specific user?

Let's say I want to display the tags related to users_question_id 1 and I want to count the number of times that tag was entered for that question by 1 each time it was entered in-order to display the tags that where entered more bigger. How would I do this using MySQL and PHP I have created two tables called questions_tags and tags. H...

Mysql deadlock explanation needed

I received the following deadlock log via "SHOW INNODB STATUS". Can someone care to explain why the transaction was aborted? It seems that Transaction 2 is holding the lock, but is also stuck requesting the same lock (except for the "waiting" part), which leads to a deadlock when Transaction 1 requires it as well. ======================...