Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Slow Mysql Select *,


I have a sql table with more then 20,000 rows in a table called summary and when I run "select * from summary" it returns a exucutions time of 0.5 seconds in php which is kinda slow if you ask me, now I know that the * type for select isnt the fastest way to fetch data but its the most convenient for me.




View Complete Forum Thread with Replies

Related Forum Messages:
Very Slow Select
The line indicated below from my php script is very slow (about 10 seconds). I have this field indexed so I thought that it would be much faster. Could someone tell me what might be wrong?

I'm also including the dump of the table definitions. This is a cd cataloging database.

Right now the filenames table is empty and I'm trying to populate it, but at the rate it's going it would take days. I have about 700,000 records in the 'files' table, but none in the 'filenames' table yet. Code:

View Replies !
SELECT WHERE IN To Damn Slow!
MySQL 5.1.30 x64
Windows XP x64 w/ latest updates.

-- Table Information --
InventoryKey = Primary Key
ContInvKey = Indexed
OwnerType + OwnerKey = Indexed

I am trying to do a SELECT WHERE IN and it's taking over 500 seconds to return results! This statement:

SELECT DISTINCT inventory.ContInvKey FROM inventory WHERE inventory.OwnerType = 1 AND inventory.OwnerKey = 18 AND inventory.ContInvKey > 0;

..takes 0.15 seconds to run and fetch 21 rows. However, if I do this statement:

SELECT * FROM inventory WHERE InventoryKey IN ( SELECT DISTINCT inventory.ContInvKey FROM inventory WHERE inventory.OwnerType = 1 AND inventory.OwnerKey = 18 AND inventory.ContInvKey > 0 );

.. it takes 500+ seconds to run and return 108 rows. Something is definitely wrong here. I can repeat it every time. I monitored the server ( I am the only connection ) and I see the server spike instantly when the query is received and then it flat lines. There doesn't appear to be any activity for 499.85 seconds. It's idle!

View Replies !
Slow Select Count(*)
I have a table with 75,000 rows.

An Explain tablename shows this

'TourPartsID', 'int(10) unsigned', 'NO', 'PRI', '', 'auto_increment'
'TourPartID', 'int(10) unsigned', 'NO', 'MUL', '', ''
'TourPartTypeID', 'int(10) unsigned', 'NO', 'MUL', '0', ''
'Language', 'int(10) unsigned', 'NO', '', '0', ''
'XML', 'mediumblob', 'NO', '', '', ''

When I do a Select count(*) from table, it takes about 12secs to return my number. This is occuring in the QueryBrowser and from the .NET library when it calls the Stored Procedure that does the Select count(*)....

My only quess that is my last column is a MEDBLOB but since I am NOT indexing that, I would figure MySQL ignores it.

View Replies !
Slow SELECT Query INNODB Table
I have a couple hundred connections doing "SELECT [Char36 Field], [LongLong Field], [Long Field] FROM [Connection Specific Table] WHERE [NonIndexed VarChar36 Field]=[Value]". Notice that the table the select statement is being called on is unique to each connection. These tables have less than 10000 records, but this statement can sometimes take over an hour to execute.

It is an INNODB table.

View Replies !
Slow Select Using Count(distinct) In A Table Bigger Than 100000 Records
Recently I started using MYSQL in my enterprise. I made a table which has around 100000 records. The problems is that it is really slow.. Im trying to do a query in which I get the number of distinct users per day.

This is my query:

select date(startedDate) as mydate, count(distinct(Users)) as users from Mytable
group by mydate

It is really simple and it does it correctly but it takes one minute.. One minute is not too much time but i need to insert around 10 000 000 records and thats what worries me.....

View Replies !
Slow MySQL
mySQL has been running very slowly and I am getting errors. First I did 2 things I raised the ServerLimit number (apache) to allow for more connections, I also raised the max conncetions in my.cnf. I do not know if this took effect? That should have worked. But basically in phpmyadmin i get this error frequently. I am getting more traffic so I think it is that.

MySQL said: Documentation
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

View Replies !
Why Does MySQL So Slow
I just changed to use MySQL few days ago but it was a bad idea. My server now is running very slowly with the database. I'm using Perl5 and DBD::Mysql in my script. The system is Linux9, Apache2.

I looked at these mysql pid and saw a lot of activities (about 400) while there are more 100 users online at this moment and lots of running under a the same pid number.

View Replies !
MySQL Slow
I had downloaded a few years back mySQL v3.51 installed but never used it. Now I wanted to convert some B-TREE databases to mySQL and did some testing via ODBC to insert 70,000 records: My results:

MS ACCESS: ~60,000 msecs
MYSQL v3.51 ~18,000 msecs

Impressed with the speed, I went ahead and got the latest MySQL v5.1. Uninstalled the older version, I had nothing there to preserve, so I did a simple new install with MySQL v5.1. I noticed the size of the files and BINEXE increasted by 1,000,000%. Ok, Bulky. Not a problem.

I reran the same ODBC test, and now I got:

MYSQL v5.1: ~450,000 msecs or 7.5 freaking MINUTES!

What the hell happen? Nothing was done. I'm knew to MYSQL. I just installed it with all the defaults. I did choose "developer's machine" for the "optimizer wizard"

I can't redistribute MYSQL v3.51 and force it down people's throats! I have to use what they are using already, if already installed. Not even my current system takes 1 minute to add 70,000 records. Why 7.5 minutes? All it is simple inserts/free statements.

View Replies !
MySQL Slow Log
I have the long query time set to 15 yet MySQL is still showing results with a query time of 0 in the slow query log.

It says enter time in "seconds" in the MySQL Administrator but did it mean in milliseconds??

View Replies !
MySQL Slow In Windows NT4
I am running the Apache web server, MySQL v4, and PHP on an NT4 server.
Apache runs great, but the auction software I am using (Web2035 Auction
software written in PHP) is very, very slow.

Sometimes it takes 20-30 seconds to bring up an auction page from the items
table which has less than 200 records in it.

Can anyone can give me some pointers on where to start looking? (I don't
know if the bottleneck is with MySQL or PHP or what I might need to look at
to enhance the performance of either package.)

View Replies !
MySQL Slow Starting Up
I am using a Windows 2003 Web Edition Server running IIS and MySQL 4.1. I had to restart the server the other day and it took MySQL almost 2 hours to come back up. I was watching it on my task manager and it went up to approximately 60,000k in 10k increments before I was able to access MySQL.

My CPU usage was hovering around 3% all this time. Everything else came up on the server just fine. This happens every time I have to restart my server. The reason I have to restart my server most of the time, is because MySQL locks up on me.

Is there any settings I can change that would help me here? Any help would be greatly appreciated.

One more thing to add. I am using the default my.ini file. We have almost 100 different databases on the server and have around 20000 tables within all of these databases combined. All of these tables are InnoDB tables.

View Replies !
MySQL Running Very Slow
I have the following INSERT SQL, which runs very slow (For 2 full days it had not done anything) on a 2 processor Compaq machine running Suse Linux. Code:

View Replies !
MySQL Is Slow, Trying To Optimize
It just seems that my system is slow, adding records, etc. I tried to optimize it, saw that there was a my-medium.ini file, read that is was for medium sized system. I replaced it with my.ini (yes I did make a backup, thankfully) and restarted mysql.

Pretty much it hangs. I tried to connect with QueryBrower, did a Select Count(*) and just froze. I admit that I didn't wait for ever, yes I know I Select Count(*) takes a long time but I gave up after waiting 3x as long as I normal did. Also the logs screen froze in administrator.

View Replies !
Slow Running MySQL?
I'm hoping someone may have an idea what could be causing the slow loading pages of my web-site. I'm not positive, but I'm relatively sure that it's related to a problem with MySQL database.

I purchased a program called Sam3 for broadcasting our radio signal over the internet. The software requires the use of MySql in order to set up web pages for our web site.

The problem is, that while everything works GREAT (requests can be made from the site, songs can be searched, the history of what we've played shows up) the pages load PAINFULLY slow. Other users of this software have had no such problems so I'm at a loss.

I know from testing that the PHP script for the web pages is fine, I have plenty of bandwith both upload and download available on my DSL line, and while the computer running MySQL is behind a router I have tried plugging the DSL line DIRECTLY into the host computer and it makes no difference.

For all appearances it seems the problem is that it takes MySQL forever to gather and provide the information needed for these pages. Does anyone have any idea what I should be looking at to solve this problem?

I do not know the MySQL program at all, so I get somewhat lost when people start throwing out technical terms, but this has been really frustrating because no one else seems to have the problem and everyone so far has just told me to check the things I've already checked.

View Replies !
MySQL Connection Sometimes Slow
I have been developing an application in Visual Basic that accesses a MySQL database either on the local machine, or a remote machine. Locally, database connections run smoothly. However, when I try to connect to the remote system (another computer on my local network) some databases take longer to connect than others (sometimes 10 - 20 seconds).

The application usses the myvbql.dll (sorry lost the link, found it through google) wrapper around the libmysql.dll file to perform database actions. The application seems to hang when it tries to actually make the connection to the datatbase. This is only happening on the remote database server, and does not happen on every connection to that server.

View Replies !
Slow Remote MySql
We have a local (client) machine that runs a php application on windows using apache, the database for this application is on a remote server, which the client machine connects to via the servers ip number and the server accepts the connection from the client via the designated ip address (skip-resolve-address is set in MySql server and no dns addresses are used, only ip).

However, the php application when dealing with the data from the MySql server is still pretty slow. We've tried query cache, but still slow.

When I say slow, I mean page response and reloads take about 5 or 6 seconds. Is this expected from a remote server and using apache as we do for this application? When using a local MySql server the speed is pretty much instantaneous, but we need the remote server!

Also, in testing the remote MySql server with a program such as SQLyog, response to requests are very quick and queries take no time.

How could we go about testing for where the bottleneck is? Could it be apache and php (and where do we start looking for the problem? Local MySql server is nice and fast)?

View Replies !
MySQL ODBC 3.51 Driver Very Slow!
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL
tables to a Microsoft Access 2003 database. I am finding that the data from
the MySQL tables takes a hell of a long time to load making any kind linkage
with my Access data virtually useless.

I have the MySQL driver setup in as a USER DSN. The MySQL data is sitting
out on a server and the Access database is running locally.

View Replies !
MySQL Slow: Configuration To Blame/fix?
I have MySQL 5 running on a PC, and have grown used to the startling slowness of MySQL joins. The most recent disappointment is a straightforward self-join of a not-too-big (700K rows), indexed (on very-high-cardinality column FILE) table

create table temp2 as
select a.*, b.time as time2,
from temp1 a left join temp1 b
on a.file = b.file
and timestampdiff(HOUR,a.time,b.time) = 1;

that completed in 10 hours. (Indexing resulting table took 20 minutes). If this is not a problem with the programmer, or with MySQL, could it be a result of a mismanaged installation, one that could be fixed with a judicious re-configuration/choice of MySQL options?

View Replies !
Delay, Latency, Slow Mysql
I recently upgraded mysql from 3.23 to 4.0 and found that my websites using the mysql db had a 5 second delay, or latency. I searched for 2 days and found no answer to my latency problem until just a moment ago. I'd like to share the answer in case someone else finds this occurring to them as well.

I was using my real static ip in my website mysql address instead of 'localhost', localhost should have been used initially anyways. I am not real sure what my reasoning was when I initially chose to put in my static IP.

So, If you are like me and keep your stuff on your local machine, use 'localhost' instead of your static IP. At least it fixed my delay issues.

View Replies !
Mysql -s -u Root Bmd < Db.dump2 Slow
I've been sent a dump of a database and am trying to restore it with the
command in the subject line. It's progressing, but very slowly. The
problem is that the database is 40GB.

Now if mysql is doing database-y thing like allowing access while building
tables this might be slowing it a little. Is this the case and is there any way
round the problem and slurp the the whole thing in isolation.

Background: debian sarge

mysql-server-4 4.1.11a-4sarge

I really *am* a mysql newbie - tell me I'm silly for starting at 40GB

View Replies !
My MySQL Back-end Works Very Slow
I have installed my MySQL Server in a Window XP platform running in a Pentium4 machine. When I access the database on the machine, it is working in a normal speed. But when I access the database from a client machine (still running in windows platform), it runs very slow.

View Replies !
Mysql 5.0 - Using My.cnf - Unix / Slow-query-log
I installed mysql 5.0 and need to set up slow-query-log and other logging options.

Here is what I did. But I dont see it working yet.

1. cd /var/db/mysql
2. chown mysql slowquery.log
3. touch /usr/local/etc/my.cnf
4. chown mysql /usr/local/etc/my.cnf

vi my.cnf

[mysqld_safe]
-u mysql
--log-slow-queries=/var/db/mysql/slowquery.log

so now when I type:

mysqladmin shutdown
and than

mysqld_safe &
my sql restarts but the log files are not being used.
also - how do I know if my my.cnf is being used at all?

View Replies !
Remote MySQL Connection Slow
I have a website on a dedicated server that was running really slow, so I got another, much faster server and transferred the MySQL database to this server. However, now when I connect to the faster server's database using the slower server's PHP web pages, the overall page loads much slower than when the database was on the slower server.

Any ideas why this would be? Right now the host name is just an IP address. Does it need an actual resolved hostname to be fast? MySQL on the faster server is supposedly tweaked for fast service (my-huge.cnf).

View Replies !
Slow Performance After Falling Back To MySQL 3
Yesterday I have upgraded my linux box with a pair of Xeon 1G CPU and
reinstalled everything (it was a sinle Xeon 700). The default RH9
installation comes with MySQL 3.23.54. After the reinstallation I
found the machine was not as responsive as before. (It's not very
slow, but some lagging is noticed)

I was running Mysql-max 4.0.11 and the performance was ok, except the
slowness during the peak hours, which was regarded as normal. I would
like to know the differences between Mysql 3 and 4. Is the new version
making a significant jump in performance?

I also noticed the system eats up memory faster than before. With the
old setting the system never used up 60% of physical memory, even at
extremely high loading (30+). Now it easily used up 70% of memory.

Code:

View Replies !
Mysql Running Slow On Mandrake Linux 10.0 For AMD 64
I'm having a problem with a new machine running Mysql version 4.0.18
on the AMD64 version of Mandrake 10.0. The new machine has got 64bit
AMD processor and 2GB of RAM.

Nearly all queries(updates are especially slow) are running 20/30 or
more times slower than on an inferior(32 bit processor, 1.5GB RAM)
machine runnning Mysql 3.23.56 on mandrake 9.0.

As far as I can tell mysql is configured correctly for the power of
the machine. The my.cnf file looks like this: Code:

View Replies !
MySQL Slow To Connect To Remote Database
I was running a PHP/MySQL web site with the database on the local web server. I needed to move the database off the webserver (located in the firewall DMZ) and onto its own machine (behind the firewall on our private network)

Now when I run my web site it goes really slow. I ran mysql from the command line on the web server and connected through to the database machine behind the firewall using
webserver:/# mysql -h 192.168.1.7 -u www-data -p

After I enter the password, it takes around 5-7s before I see the mysql> prompt.

Is mysql trying to do reverse dns on the IP address and timing out? I added the machine details to /etc/hosts so it would be recognized but no improvement. Or do I have something wrong with my mysql configuration?

View Replies !
Slow Connect Linux To Windows MySql
I have a Linux box with the latest MySql and another box (Windows 2003 Server) with the latest Mysql.

From the unix prompt I do this:
mysql -uroot -pmypass -h windowsserver mydbname

this take about 4 seconds to connect

I do the exact same thing on a windows workstation and its connected instantly.

View Replies !
VER VERY VERY Slow MySQL Query HELP URGENTLY NEEDED
I have the following MySQL query, but it is VERY VERY slow and seems to be crashing the server. There are 300,000+ records in the 'tracker' table.

SELECT sites.*, SUM(if(tracker.type='view',1,0)) AS numberOfViews, SUM(if(tracker.type='click',1,0)) AS numberOfClicks, SUM(tracker.revenue) AS totalRevenue FROM sites LEFT JOIN tracker ON tracker.site_id = sites.id GROUP BY sites.id ORDER BY sites.domain_name


View Replies !
MySQL Timing Out? Really Slow Queries, Already Indexed.
For whatever reason, MySQL does not seem to be executing. So, I ran a few stat functions and here is what I got:

Uptime: 220372
Threads: 39
Questions: 18748899
Slow queries: 808
Opens: 28723
Flush tables: 1
Open tables: 4096
Queries per second avg: 85.078

The "open tables" worries me for a few reasons. First, because it is 4kb (exactly, since it is divisible by 1024, evenly). This makes me think that maybe I am hitting a ceiling.

Second, there are a few variables in MySQL that equal this, and maybe it's a cap on something. Here are the variables that equal 4096:
query_cache_min_res_unit = 4096
table_cache = 4096
transaction_prealloc_size = 4096

Do any of those have anything to do with this? Am I even close? Are any of those values from mysql_stat a big deal?

View Replies !
User Admin In Mysql-administrator Slow On Linux
We have a MySQL 5.0.16 server installed on a RedHat 8.0 machine.
mysql-administrator v1.0.22 is installed on RH Linux FC3 from the
mysql-administrator-1.0.22a-1.rh9.i386.rpm.

Everything seems to run fine except User Administration is *extremely*
slow. If I click on "User Administration" in the sidebar, it takes
about 2 minutes (seems like forever) before the window comes back with
the infomation. All the other functions seem to function fine.

Is it because I'm using mysql-administrator on a remote host? Do I need
to move and rebuild the server to a newer Linux version? mysqlcc
doesn't have this problem at all. (It's using the libraries from MySQL
4.1 that the databases were migrated to.)

View Replies !
Slow To Get "C:/mysql>" Prompt
I'm setting up MySQL, Apache and PhP on my pc - Win98, 128meg to work on a project.

My problem is this - I have installed MySQL and find that if I go into it via the DOS prompt (C:/mysql/bin/mysqld) it takes at least 10 minutes before the C:/mysql> prompt appears and I can start using it ... this I'm sure is not right ? I have tried with the mysql admin tool but it too takes ages to load ???

View Replies !
Slow
What generally would be the reason why all my db driven sites are running slowly or even hanging. I am on braodband speed but just changed hosts.

View Replies !
Update Too Slow
I need to update 25 * 5000 records, if I do one at the time it takes too
long time, do any one have a good proposal ?

View Replies !
MySQLdb Slow
I have a Python program that parses a file and inserts records into a
database with MySQLdb. I recently upgraded to MySQL 5.0.8, and now my
parser runs *really* slow. Writing out to CSV files is fine, but when I
try to insert the same records in a MySQL5 database, it slows to a
crawl. Using MySQL 4.1 seems fine. The data seems to be inserted
correctly, it's just really slow.

View Replies !
Slow Restore
Mysql 4.1.15 on Win2k. Using InnoDB.

Using the mysql administrator gui to create a backup, everything goes
fine, and restores quickly.

Using the command line:

mysqldump %dbname% --single-transaction > %dbname%.sql

creates a file about 15% smaller than the gui produces, and is
EXTREMELY slow to restore. I have tried adding locks, skip opt,
everything. What does the gui use for a command to create this dump?

View Replies !
HEAP So Slow
I have a heap database, with 1.5-1.6 milion rows. on that is 2 columns...

ID | Title

title is indexed. When i run a query like this
------------------
SELECT index_data.* FROM index_data INNER JOIN `index` ON index_data.id=index.id AND index.title LIKE '%$query%' WHERE playtime > $dur... The execution time is about seconds...
------------------
Even a single like statement just on `index` (heap) takes 3-6 seconds.

Here's the table stats...
----------------------------
Data 397,442 KB
Index 24,639 KB
Total 422,081 KB
----------------------------
Why??

View Replies !
Too Slow Queries
I am using version 5.0.4. I noticed that suddenly my queries were becoming too slow. I have data in three tables, with 40,000 rows, 50,000 rows and 70,000 rows respectively. I was able to run queries that joined the three tables together and get the results in less than 5 seconds. I tried updating the tables through a program that used a stored procedure to delete the tables but I had some other problems. Since the I restored the data in the tables from backup databases. Now I can't run any queries that join the three tables together, it waits for a long time and then times out. The data in the tables look good. Now I can't get the results from any of the other backup databases either. It look like the entire MySQL server has slowed down greatly. I tried rebooting the server to no avail.

View Replies !
Slow Db Access
I have worked with a few mysql dbs on different servers but i have recently been asked to work with one on nicnames. It seems horribly slow. Working in phpMyAdmin (which i had to install myself) it takes ages when i want to do anything. View the table structure, view the data..etc. Any way i can test the speed so that i can compare it against another server i work with and proove there is a speed issue and take it to nicnames cus it is crazy and is going to affect the speed of the website!!

View Replies !
Slow Insertions
I have a MyISAM table with fixed width rows (ie no vars). I also have keys disabled. I am running a huge data load process. When it first started it was inserting about 38 records a second. Now, after about 200,000 records, it speed is about 22 recoerds per second. Whats going on here? and how can I improve it?

I am loading about 15 million records, so the difference between 22 per sec and 38 per sec is SIGNIFICANT (ie 2 days).

View Replies !
Slow Performance
On my index.php page, I have a simple query that checks the session_id against a table where I store other session_id'. If it's not there, it records it (unique hit). If it's there, it doesn't record it (not a unique hit.) This usually goes off without a hitch, and every month or so I empty the table.

Right now I only have about 2500 rows, and it's taking forever to load the page. Is there something possibly server related that could be causing this? My host charges an arm and a leg just to see if there's something wrong if I bring up an issue, so I'd like some insight as to whether there's a commonly known server-side issue that can bog down performance.

View Replies !
Slow Queries!
I have a website which has a users table in a mySQL database. This users table is large (It has about 25 columns - most varchar(100)) but only has about 10000 records. The records contain user information which is searched with a javascript form.
My problem is that when I click to 'view all', it takes about 7 seconds to load. This seems a lot?
Does 25 cloums seem sxcessive in a table? Can anyone point me to some good tutorials / docs on improving query performance? I have defined the colums as best as I can, but I am using SELECT * from table, would selecting individual columns make a big difference?

View Replies !
Slow Subquery
Can anyone tell me why the following query with sub-query takes forever to finish? (I've le it run for 20 minutes, and it still hasn't finished)

select date from temps where date in (select distinct date from observations where camera like "a")

The sub query returns 10 dates. The outer query is on a table that contains about 40,000 rows. What's the big deal here? All I'm trying to do is select rows from "temps" that match a small range of 10 dates. Is there another way to do this? Is a sub-query the wrong approach?

View Replies !
Slow Connection
I build an application and installed it on many machines. In every machine except two, the program works without problems. On this two, the connection with database is too slow.

I saw the opened doors with 'netstat' and the computer opens about 5 or 6 ports (to the port 3306 of the mysql server) before sucessfuly connect with MySql Database and execute the sql. I don't know what could be happening. I realy need to fix this because the progrm is too slow with this error. Could anyone know what could be happening??

View Replies !
Slow Query Log
my slow log is catching a slow query, however the timestamp for the query is "0". I also placed a timestamp on the query to echo out to the results page, and it is about 4 thousands of a second. Why is it showing in the slow log?

View Replies !
Slow Query Using NOT IN
I am migrating a MSSQL server to MySQL. I know the following SQL is valid for both servers, but MSSQL finishes execution of the query almost instantly, and MySQL has been running the query for the past ten minutes and still is not finished. There is basically the same amount of data in each database. Does anyone know ....

View Replies !
Slow Subqueries
I know (by internet) that mySQL is very fast. Problem is that my subqueries that are very fast in Access or SQL Server but they are very slowly in mySQL - since I have to restart my computer because mySQL freeze all the processes. (the resources where used at maximum - 2 Gb RAM, 2,5 Ghz processor)

This is the query :
SELECT NPL, PP FROM P_A INNER JOIN ACTIONS
ON P_A.NA =ACTIONS.ACT_N WHERE P_A.NA in
(SELECT NA FROM P_A WHERE NP ='ABC')

P_A has 5 columns and 12000 rows
Actions has 5 columns and 770 rows

Any suggestions ?

View Replies !
Slow Request
I want to run the following request:

mysql> select count(*) from fingerprints where fingerprint in (select fingerprint from fingerprints where id_file=3263);

where fingerprints is the following table: ....

View Replies !
Join Too Slow
I'm creating a query that use Join clause. I tested it in MySQL 4.0.24 and with MS-ACCESS. . . . in MySQL is slow!!! any suggestion ?

View Replies !
Slow Max() Selection
I have a large table with some fields. Two of them are:

year char(1) && year's rightmost character
OrderNo integer

Both are keys (BTREE).

I need to select the last order in the year.

select max(OrderNo) from ORDENES where year='8'

While the year is growing the selection speed id decrement (12 seg).

View Replies !
Slow Connect
Does anybody know why it sometimes takes more than 10 seconds to connect to a database and sometimes it just takes half a millisecond?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved