473,666 Members | 1,992 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database statistics / cardinality - NULL problem

I have a database table with approx 3 million rows.
There are 9 indexes on this table.

The command:
SHOW INDEX FROM TRAN;
Returns results as expected with all indexes some valid "Cardinalit y"
values.

After a period of time or a series of events (unknown to me) the statistics
for one or more indexes shows a NULL value in the cardinality.
This causes queries that rely on these indexes to become incredibly slow,
sometimes doing a full table read.

I have been trying to find out what causes the statistics to become NULL?
Any help here would be appreciated.

I currently have a nightly process that scans for NULL table statistics then
updates (analyze table) any table effected.

Thank you for any help!
Sep 29 '05 #1
2 4681
Ihug wrote:
After a period of time or a series of events (unknown to me) the statistics
for one or more indexes shows a NULL value in the cardinality.
This causes queries that rely on these indexes to become incredibly slow,
sometimes doing a full table read.


What version of MySQL are you using?

I see a bug (http://bugs.mysql.com/bug.php?id=2019) that matches this
issue, but it's reported against MySQL 3.23, and the response is "Won't
Fix" because that release it so far out of date.

If you can reproduce the behavior on the latest MySQL 4.1 or 5.0
releases, I'd recommend filing a bug at bugs.mysql.com.

Regards,
Bill K.
Sep 29 '05 #2
The site is currently running 4.0.18.
Maybe I will look at the mysql version and upgrade notes then perhaps
install the latest stable release.
Thank you.
"Bill Karwin" <bi**@karwin.co m> wrote in message
news:dh******** @enews3.newsguy .com...
Ihug wrote:
After a period of time or a series of events (unknown to me) the
statistics for one or more indexes shows a NULL value in the cardinality.
This causes queries that rely on these indexes to become incredibly slow,
sometimes doing a full table read.


What version of MySQL are you using?

I see a bug (http://bugs.mysql.com/bug.php?id=2019) that matches this
issue, but it's reported against MySQL 3.23, and the response is "Won't
Fix" because that release it so far out of date.

If you can reproduce the behavior on the latest MySQL 4.1 or 5.0 releases,
I'd recommend filing a bug at bugs.mysql.com.

Regards,
Bill K.

Sep 29 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6725
by: Vissu | last post by:
Hi All, We have one column with low cardinality, 4 or 5 unique values across 50 mil rows. Our query has this colunmn as a predicate. Binary index is not helping. I am tempted to create bitmap index but the general myth is there could be lot of contentions. We have a highly active OLTP system with concurrent DMLs.
6
2318
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of performance hogs like cursors, but I know there are lots of ways the application could be made more efficient database-wise. The server code is running VB6 of all things, using COM+ database interfaces. There are some clustered and non-clustered...
2
10445
by: Rizyak | last post by:
-----Cross posted on comp.databases.ms-sqlserver and microsoft.public.sqlserver.programming----- Can someone please explain cardinality to me? I am having a problem with an insert from a webpage. When a user adds a venue with an event I need both tables to populate. Currently only the event table populates the right info and the venue does not. I am using SELECT SCOPE IDENTITY to get the last inserted venue to associate with each...
3
1396
by: ROAN | last post by:
Hallo I need a help in optymalization database. My database is much slower than bigger databeses(the same structure, only data is different). The porblem is that i can't interfer in the structure - can't change procedures, view, select ect.. I dont have any ideas how to speed it up or where can be the problem. I read some articles I but i still need more information.
17
5066
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also identifying memory leaks. The application in question is the Mozilla Web Browser. I also have had similar tasks before in the compiler construction area. And it is easy to come up with many more examples, where such kind of statistics can be very...
10
4280
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the application looks for existing rows in the table...if they already exist then it updates otherwise inserts them. The table is pretty large, around 6.5 million rows.
3
8753
by: Otto Carl Marte | last post by:
>From the IBM db2 docs: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/t0005308.htm it says that volatile tables (ALTER TABLE mytable VOLATILE CARDINALITY) do not use statistics. I would just like to clarify this statement. Does this mean that no statistics at all are used when determining the execution plan? or does this mean that statistics applying to cardinality are not used when...
0
1455
by: doobybug | last post by:
Hi all, I really need your help! I am new to java and have some problems with my code. I have a program which inputs questionnaires and creates an object for each questionnaire. These objects are then saved in a vector which in turn is then encoded in an XML file. For all this I have made a class called MainInput. The problem is with MainOutpu class. I want to make a class that prints the questionnaires in alphabetical order (which is already...
0
1662
by: P. Adhia | last post by:
Hi, Consider the following query select * from t1 where c1 = ? and c2 = ?
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.