Assume a MySQL MyISAM table with one gigabyte of data and one gigabyte of indexes.
Furthermore, assume that during development columns and indexes will be added and removed from/to the table quite frequently. Due to the size of the database the column/index creation is slow when using the standard non-tuned MySQL settings.
Which MySQL ...
I am looking for the best MySQL client for my iPhone. I see several like Flipper and iMy and several others, but before I invest a bunch of time and a little money trying them out, I would like to just start with the best most feature rich one. I would link to the others but don't have permission yet.
...
Hi, I'm looking for an ANSI-SQL method to do a Select query without returning any record, but fill a TDataSet's Fields structure.
The method I found is by adding a "where 1=0" in any query, for example:
Select Id, name, province
from customers
where 1=0
This is a fairly trivial example, it turns a little more complicated when I have ...
I have a php array of "primary key" values, which correspond to just a few rows of a very long table of data, saved on a MySql database.
How can I fetch with just one query only those rows. Is it possible or will I need to make one query per primary key? eg: SELECT * FROM table1 WHERE key = 8573
Thanks,
Patrick
...
I have a very large table in MySQL. I'm using a CHAR(32) field which contains an MD5 as a string of course. I'm running into an issue where I need to convert this to a decimal value using MySQL. A third party tool runs the query so writing code to do this isn't really an option.
MySQL does support storing hex values natively and convert...
So, first things first, I'm a student. I'm developing an application where other students can have access to a MySQL database. Basically, I wanted to spare the students the need to search for hosting or even installing MySQL on their computers. Another plus is the fact that they can present their works to the class just by browsing a web...
Using SQL (MySQL) only I would like to select each of the last child rows of a parent child relationship where the child rows are ordered by a timestamp.
For example using the tables invoices and invoice_items, I want the newest (ie: most recently timestamped) invoice_items records for each invoice respectively.
-------------------...
I need to lookup all my products (sku's) their latest stock quantity.
I have one table (called "stock") with 315k+ records containing this information (a new batch of data is added every day, for most sku's). The reference data is in another table (called "stockfile").
This is the query to do it:
SELECT s1 . * , f1 . *
FROM stock s1
JO...
There are several ActiveRecord styled query builder libraries out there. Some are stand alone and some come built into frameworks. However, they really have trouble with WHERE and HAVING clauses when it comes to complex SQL. Setting other databases aside - I am trying to come up with a MySQL and PostgreSQL compatible WHERE() method that ...
I'm about a week into learning PHP, jQuery and AJAX and am picking up quickly. I'm building a new video website with a comment system that I need a little help on. The site shows a list of video thumbnails, and when the user clicks the thumbnail, jquery automatically changes the html on that page to show the correct video:
$(".thumb...
If I specify a number, say 5, what query will give me all the rows after the 5th row? Like,
SELECT * FROM table WHERE 1=1;
only I want it to exclude the top 5. Thanks.
...
Hello all,
I've never used the ARCHFLAGS command before and am in way over my head.
I'm struggling with getting the MySQL gem working on Snow Leopard in 64 bit.
What I'm doing is this command:
sudo env ARCHFLAGS='-arch x86_64' gem install --verbose --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
The...
I have a MySQL database that I'm porting to PostgreSQL (because of GIS features).
Many of the tables have hundreds of thousands of rows, so I need to keep performance in mind.
My problem is that PostgreSQL seems abysmally slow...
For example, if I do a simple SELECT * FROM [table] on a particular table in the MySQL database, let's say...
I have a PostgreSQL database whose tables are divided amongst a number of schemas. Each schema has a different set of access controls; for example, one schema might be read-only to regular users, while they are allowed to create tables on another. Schemas also act as namespaces, so users don't have to worry about duplicating existing t...
When querying the db is it plausible to feel extremely paranoid? I go as far as opening and closing mysql connection every time a new query has to be done. I am afraid that (especially with the ajax enabled pages) this would cause great performance downgrading.
Should I continue in this method or at least open and close connections once...
I often find myself in need of very complex SQL examples when testing abstraction concepts or just comparing database styles and structures while working with PostgreSQL, MySQL, and even SQLite.
I assume that means there are others in need of insane queries to open our eyes to what is possible and insure our DB layers can handle anythin...
I've a MySQL InnoDB table with 1,000,000 records. Is this too much? Or databases can handle this and more? I ask because I noticed that some queries (for example, getting the last row from a table) are slower (seconds) in the table with 1 millon rows than in one with 100.
...
hi
is that possible to use WHERE like this;
$no = $_GET['no'];
$query = "SELECT * FROM `numbers` WHERE `myno` - $no = 4";
...
if not, how can i get the rows like the below example ?
EDIT:
to be more clear,
$today = date("Y-m-d");
$query = "SELECT * FROM `dates` WHERE date - $today = 7";
i want to find rows that has date field ...
Here the deal: I've got a table Billing, which is basically a receipt (for different types of transaction). The app has a feature that you can create new charges (well, all charges except for tax and other constants). Since there would be a dynamic number of charges, we decided to store the charges for a billing on a single text field wi...
I am restructuring a classifieds MySQL db where the different main sections are separated into separate tables. For example, sale items have their own table with unique ID's, jobs have their own table with unique ID's, personals have their own table as well.
These sections all share a few common characteristics:
-id
-title
-body
-listi...