I would like to change variable bdb cache size (bdb_cache_size) on my mysql database to be able to import bigger SQL files (yes, i've set all other variables for example in php.ini to higher values and it does not work) in phpmyadmin.
How can I do that?
...
I'm trying to retrieve a count of all unique values in a field.
Example SQL:
SELECT count(distinct accessid) FROM (`accesslog`) WHERE record = '123'
How can I do this kind of query in CodeIgniter?
I know I can use $this->db->query() and write my own SQL, but I have other requirements that I want to use $this->db->where() for, and if...
In a lot of databases I seem to be working on these days I can't just delete a record for any number of reasons, including so later on they can be displayed later (say a product that no longer exists) or just keeping a history of what was.
So my question is how best to expire the record.
I have often added a date_expired column which i...
I have a logging table that stores the user id, date/time, table name, record id, query type (insert, update, delete, etc), and the full SQL that was run. There are a couple keys on this table, but they don't need to be updated right away. Typically the table is used to eitehr check for problems (someone made a mistake or there was a sys...
Hi friends,
It's possible to find the number of rows in a table:
select count(*) from tablename
Is it possible to find the number of columns in a table?
Thanks in Advance.
Praveen J
...
Is there a performance hit, or any other drawbacks to leaving query caching enabled in MySQL 5, but sizing the cache to 0 bytes?
I assume that any performance impact would be minimal if any, but I'm wondering if there are any other issues which might arise that I have not considered.
...
I need to generate sequences of games using the round robin algorithm. I have the php page where the user can input the tournament name which will be inserted into the database and it has got a drop down menu up to 32 teams (select number of teams).
So if I select 4 teams in the page, so it will be from team 1 to team 4 which would be ...
how do i ping mysql using mysql alchemy and python?
...
I have a very complex MySQL query that includes use of the same subquery three times. Will MySQL actually run the subquery three times? (It's an expensive one.) If so, is there a way for me to tell MySQL to save or cache the results so it won't do that? I could save the data in a large array then re-feed it to MySQL, but I'd rather not m...
Sql Server and Oracle have commercial products like Idera (Sql Safe) and Quest (LiteSpeed) that dramatically speed up backup and restores.
Does mysql have any commercial software like that?
I'm working with large amounts of data in mysql and if we have to restore it takes 8-10 hours. So I'm hoping to move to a commercial product that...
I have two queries. One of them makes sense to me, the other don't. First one:
SELECT gender AS 'Gender', count(*) AS '#'
FROM registrations
GROUP BY gender WITH ROLLUP
That gives me this:
Gender #
Female 20
Male 19
NULL 39
So, I get the count, and the total count. What I expected. Next one:
SELEC...
I have two installations of mysql server 5.1.32 and 5.0.77 (same machine, os x leopard). My php mysql extension is compiled against 5.0.77 (that was the easiest thing to do, and I did it after installing 5.1.32). I'm using the 5.1.32 installation since that's what I compiled my python MySQLdb extension against. I don't code in php much i...
What's the best way to delete duplicate records in a mysql database using rails or mysql queries?
...
Is there a simple way to retrieve a list of all unique values in a column, along with how many times that value appeared?
Example dataset:
A
A
A
B
B
C
... Would return:
A | 3
B | 2
C | 1
Thanks!
...
I have a client that wants to move their users from MS-Access to a PHP/MySQL web application. The data has already been migrated to MySQL and, thankfully, there are no Access forms, just queries. What they want me to do is build some kind of querying framework where users can build queries, save them, filter/drill-down results, sort by...
I want to add a new column to a table in MySQL database that should get the value of another column in the same table. Is this possible? If so, how do you do it?
Thanks!
...
Do any of the modern programming languages support mysqldump as a method, Or is it still the domain of command line environments.
...
Hi All,
I'm in the process of migrating a MySQL database from Debian to windows vista (localhost using Apache - installed and running via EasyPHP).
The database is essentially a carbon copy, every entry is the same, however when I try to access the database, I get some strange errors (for example, in some cases the first few entries in...
I need to merge two two mysql databases with identical schema. I am looking for some tool that can read database meta-data (PK, FK) and automatically generate new PKs, updating all the FKs automatically.
...
I need sphinx to sort the results by the sum of an attribute. I need to:
Group the results by their IDs (done)
Sort the results by the SUM of one attribute
I can't find a way to sum this attribute.
How could I do this?
(Im using sphinx PHP API)
...