If I have a pretty static set of data that I want to be able to access as quickly as possible. Should I cache the data into Memcached or should I store it in a HEAP table or something inside MySQL? Would one scale better than the other?
Is there some other option that's even faster?
...
I am using 'explain' to view why my query is hitting every single row in my database, and I do not understand why it is doing so.
Could someone take a look and give me a hint what I am missing?
My database is MyISAM, and I am using Mysql 5.1, PHP5
Here is my table:
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXIST...
i have table named as contacts which has nearly 1.2 million records we use
MyIsam engine whenever we query this table mysql hangs down so now we are trying our hands with Innodb engine so that if it slows down , but it will not hang up for others
so we want make fast with Myisam we tried many indexes on this table but it goes down and ...
Hi guru
I am using the latest version of MySQL connector to .NET and Visual Studio 2008. I dragged and dropped all tables from the MYSQL database to VS 2008 dataset GUI successfully. When I was going to add a new stored procedure to the dataset, Visual Studio environment just refused doing so.
Is there any solutions around this?
Than...
Lets say, I have 1000 subscribed users in mysql database. If I want to send an email to all users, what should i do?
EDIT:
What is (everybody talking) cron jobs? Can give example?
...
I am trying to select all rows from a database where display = 'Y' and announcement != null. How can I check a column to make sure it contains a value?
$qry = "select *
from school
where display='Y'
order by name, announcement, last_update";
...
Hi,
We use varchar(255) for storing "keywords" in mysql. We are facing a problem that mysql ignores all trailing spaces for comparison purposes in "=". It does respect trailing spaces in "like" comparison, but it does not let us store same word with and without trailing spaces in a varchar column if it has a "UNIQUE" index over it.
So,...
i need good open source tool for comparing two databases schema in Mysql
...
Hello,
I have written an importer which copies data from a flat table into several other tables, mapping them by a given XML. This is for a shop database, where each products can have several properties and each property can have several different languages, meaning it pretty fast sums up to a whole lot of data.
There are over 50,000 r...
Hi All,
can anyone give me any idea about how to take column value into a variable.
FOR EXAMPLE -
Declare TD int;
Declare Cnew Varchar(10);
SET @a = Concat('Select Count(*) into ', TD, 'From tb1
Where C1 =', Cnew, ';');
how to take the count(*) into TD????
Thanks in advance.
...
using mysql 5.0.32.
I have two tables: 'UserItemVote' and 'ItemStat'.
UserItemVote has:
user_id, item_id, vote(tinyint either 0 for downvote or 1 for upvote)
ItemStat has:
item_id, total_up_vote, total_down_vote
when user vote up/down an item (insert to UserItemVote table),
I want to have a trigger tai_UserItemVote to update...
I'm using Python and its MySQLdb module to import some measurement data into a Mysql database. The amount of data that we have is quite high (currently about ~250 MB of csv files and plenty of more to come).
Currently I use cursor.execute(...) to import some metadata. This isn't problematic as there are only a few entries for these.
Th...
Hi -
I currently use Zend_Db to manage my queries.
I've written already code that preforms queries like the one below:
$handle->select()->from('user_id')
->where('first_name=?', $id)
->where('last_name=?', $lname)
I've done this without sanitizing the input, assuming Zend_Db will. Does Zend do th...
I create a huge JSON-Object and save it in my database. But when I load the "string" and echo it in PHP, I can't access the JSON Object in JQuery. Do I have to consider something if I want to save my JSON Object in a MySQL Database (when I just create the Array and then echo it with "echo json_encode($arr);" it works fine, but I need to ...
I want to insert a LARGE number of rows like this:
INSERT INTO All (ID, number)
VALUES ('90001', '1');
and 90001 keeps increasing for each row. is there some way to do whis without using that command once for each row?
I'm currently using phpMyAdmin and Microsoft Excell to generate the commands for the next 10,000 rows each time...
I'm not sure which method is best to use when giving READABLE feedback to end user. I've read some forums, but not really gotten any wiser (or I have not understood it)
I would like to give feedback when insertion / update fails, when it's a success and when giving custom feedback (like checking if an item alread exists).
On INSERT, UP...
Hey all, just a quick question (should be an easy fix I think). In a WHERE statement in a query, is there a way to have multiple columns contained inside? Here is my code:
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and pwd='$pass'";
What I want to do is add another column after the WHERE (called priv_level = '$privle...
What is the best way for a server to process messages in Perl?
I'm trying
while ( 1 ) {
# Get Queue Messages
# Do Work
sleep( 10 );
}
My mysql schema is of the sort
create table message (
id int auto_increment primary key,
processed int,
message varchar(100)
)
and in my "#Get Queue Messages", I do a request like
selec...
My web app allows users to upload a bunch of photos simultaneously to the server, and then stores them in a database. When the first photo finishes uploading, it should create a default album based on today's date, and add it to that. But what if photo1 completes, looks for the album, and can't find it so it decides to create it, but bef...